Driver for Amazon's QLDB Database implemented in pure rust.
```rust,no_run use qldb::QLDBClient; let client = QLDBClient::default("rust-crate-test").await?;
let mut map = HashMap::new(); map.insert( "testcolumn".tostring(), IonValue::String("testvalue".tostring()), ); IonValue::Struct(map)
client .transactionwithin(|client| { let testtable = test_table.clone(); async move {
let _ = client
.query(&format!("INSERT INTO {} VALUE ?", test_table), &[get_value_to_insert()])
.await;
client.rollback().await
}
})
.await?;
```
For tests you will need to have some AWS credentials in your PC (as env variables or in ~/.aws/credentials). There needs to be a QLDB database with the name "rust-crate-test" in the aws account. The tests need to be run sequentially, so in order to run the tests please run the following command:
sh
RUST_TEST_THREADS=1 cargo test