dynamodb-expression

Crates.iodynamodb-expression
lib.rsdynamodb-expression
version0.2.0-beta.9
sourcesrc
created_at2023-08-18 17:56:57.346185
updated_at2024-01-26 03:36:32.780671
descriptionTypes to build DynamoDB filter, condition, or update expressions
homepage
repositoryhttps://github.com/dcormier/dynamodb-expression-rs
max_upload_size
id948043
size330,549
Daniel Cormier (dcormier)

documentation

https://docs.rs/dynamodb-expression/

README

dynamodb-expression

A Rust crate to help build DynamoDB condition, filter, key condition, and update expressions in a type-safe way, including using expression attribute names and expression attribute values.

Crates.io Docs.rs

An example showing a how to use this crate to perform a query:

use aws_config::BehaviorVersion;
use aws_sdk_dynamodb::Client;
use dynamodb_expression::{Expression, Num, Path};

let client = Client::new(&aws_config::load_defaults(BehaviorVersion::latest()).await);

let query_output = Expression::builder()
    .with_filter(
        "name"
            .parse::<Path>()?
            .attribute_exists()
            .and("age".parse::<Path>()?.greater_than_or_equal(Num::new(2.5))),
    )
    .with_projection(["name", "age"])
    .with_key_condition("id".parse::<Path>()?.key().equal(Num::new(42)))
    .build()
    .query(&client)
    .table_name("people")
    .send()
    .await?;

For more, see the docs.

Commit count: 80

cargo fmt