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§

errors
partition_helpers
row_helpers

Macros§

make_partition
Outputs a partition, given native Rust key => value pairings.
make_partition_insert
Helper macro to support [make_partition].
make_row
Outputs a row, given native Rust key => value pairings.
make_row_insert
Helper macro to support [make_row].

Structs§

Client
The best way to communicate with a PancakeDB server from Rust.
SegmentKey
Crates.io

Functions§

new_correlation_id
Generates a new random correlation ID for use in read requests.