Crates.io | ydb-steroids |
lib.rs | ydb-steroids |
version | 0.1.2 |
source | src |
created_at | 2022-07-12 17:58:36.760356 |
updated_at | 2022-07-13 01:25:46.260589 |
description | Added extra functional to yandex database rust client. Such as migrations, macro for query, testcontainer support. |
homepage | |
repository | https://github.com/cheetah-game-platform/ydb-rust-steroids |
max_upload_size | |
id | 624554 |
size | 36,094 |
let mut migrator = Migrator::new_from_dir(&include_dir!("$CARGO_MANIFEST_DIR/test-migration"));
migrator.migrate(&mut client).await.unwrap();
query!("insert into a (id) values($id)", id=>id)
let result: Vec<i32> = select!(client.table_client(), query!("select id from a"), id=>i32)
.await
.unwrap();
update!(
client.table_client(),
query!("insert into a (id) values($id)", id=>id)
)
Enable feature test_container
let (_node, client) = get_or_create_ydb_instance("should_create_docker_and_connect").await;