ydb-steroids

Crates.ioydb-steroids
lib.rsydb-steroids
version0.1.2
sourcesrc
created_at2022-07-12 17:58:36.760356
updated_at2022-07-13 01:25:46.260589
descriptionAdded extra functional to yandex database rust client. Such as migrations, macro for query, testcontainer support.
homepage
repositoryhttps://github.com/cheetah-game-platform/ydb-rust-steroids
max_upload_size
id624554
size36,094
Kviring Alexey (avkviring)

documentation

README

Steroids for ydb client

Migration

let mut migrator = Migrator::new_from_dir(&include_dir!("$CARGO_MANIFEST_DIR/test-migration"));
migrator.migrate(&mut client).await.unwrap();

Query macros

query!("insert into a (id) values($id)", id=>id)

Select macros

let result: Vec<i32> = select!(client.table_client(), query!("select id from a"), id=>i32)
.await
.unwrap();

Update macros

update!(
client.table_client(),
    query!("insert into a (id) values($id)", id=>id)
)

Test container

Enable feature test_container

let (_node, client) = get_or_create_ydb_instance("should_create_docker_and_connect").await;

Commit count: 18

cargo fmt