6 releases

0.2.0 Apr 4, 2022
0.1.2 Mar 10, 2022
0.1.1 Feb 25, 2022
0.1.0 Jan 10, 2022
0.0.0-alpha.0 Oct 26, 2021

#4 in #pancake

Apache-2.0

37KB
857 lines

Crates.io

PancakeDB Client

The PancakeDB client supports

  • the full PancakeDB API via GRPC,
  • helper macros to build requests more easily,
  • and higher-level functionality for reads.

Most users will primarily use the client library for writing data with write_to_partition requests and occasionally use it for table creation, alteration, and deletion.

Get Started

For basic usage and detailed explanations, see the docs.rs page.

For a complete example, see the runthrough.

For details about the API calls and what all their fields mean, see the API docs.


lib.rs:

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.

Dependencies

~6–8.5MB
~148K SLoC