Amazon's QLDB Driver
Driver for Amazon's QLDB Database implemented in pure rust.
The driver is fairly tested and should be ready to test in real projects.
Example
use QldbClient;
use HashMap;
let client = default.await?;
let mut value_to_insert = new;
// This will insert a documents with a key "test_column"
// with the value "IonValue::String(test_value)"
value_to_insert.insert;
client
.transaction_within
.await?;
Session Pool
The driver has a session pool. The second parameter in the QldbClient::default is the maximum size of the connection pool.
The pool will be auto-populated as parallel transaction are being requested until it reaches the provided maximum.
The pool uses one independent thread with a single-threaded executor in order to be able to spawn tasks after the session has been returned.
Underlying Ion Format Implementation
The library uses ion-binary-rs, which is our own, pure rust, implementation of the format. It is very well tested and ready to use in production too.
Test
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:
RUST_TEST_THREADS=1