Driver for Amazon's QLDB Database implemented in pure rust.
The driver is fairly tested and should be ready to test in real projects. We are using it internally, so we will keep it updated.
```rust,no_run use qldb::QLDBClient; use std::collections::HashMap;
let client = QLDBClient::default("rust-crate-test").await?;
let mut valuetoinsert = HashMap::new(); // This will insert a documents with a key "testcolumn" // with the value "IonValue::String(testvalue)" valuetoinsert.insert("testcolumn", "testvalue");
client
.transactionwithin(|client| async move {
client
.query("INSERT INTO TestTable VALUE ?")
.param(valueto_insert)
.execute()
.await?;
Ok(())
})
.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