Skip to content

DavidBM/qldb-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amazon's QLDB Driver

Driver for Amazon's QLDB Database implemented in pure rust.

Documentation Crates.io

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.

Example

use qldb::QLDBClient;
use std::collections::HashMap;

let client = QLDBClient::default("rust-crate-test").await?;

let mut value_to_insert = HashMap::new();
// This will insert a document with a key "test_column" 
// with the value "IonValue::String(test_value)"
value_to_insert.insert("test_column", "test_value");

client
    .transaction_within(|client| async move {   
        client
            .query("INSERT INTO TestTable VALUE ?")
            .param(value_to_insert)
            .execute()
            .await?;
        Ok(())
    })
    .await?;

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 cargo test

About

Pure Rust driver for Amazon's QLDB ledger

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages