Crate pancake_db_client
source · [−]Expand description
Most common usage:
use pancake_db_client::{Client, make_partition, make_row};
use pancake_db_idl::dml::{WriteToPartitionRequest, WriteToPartitionResponse};
let mut client = Client::connect("http://localhost:3842").await?;
let req = WriteToPartitionRequest {
table_name: "my_table".to_string(),
partition: make_partition! {
"string_partition_col" => "my_partition_value".to_string(),
},
rows: vec![
make_row! {
"bool_col" => false,
"f32_col" => 1.1_f32,
}
],
};
let resp: WriteToPartitionResponse = client.write_to_partition(req).await?;
See Client
for more details.
Modules
Macros
Outputs a partition, given native Rust key => value pairings.
Helper macro to support make_partition
.
Outputs a row, given native Rust key => value pairings.
Helper macro to support make_row
.
Structs
The best way to communicate with a PancakeDB server from Rust.
A fully-specified segment.
Functions
Generates a new random correlation ID for use in read requests.