pancake_db_client/
lib.rs

1//! Most common usage:
2//!
3//! ```
4//! use pancake_db_client::{Client, make_partition, make_row};
5//! use pancake_db_idl::dml::{WriteToPartitionRequest, WriteToPartitionResponse};
6//! # use pancake_db_client::errors::ClientError;
7//!
8//! # async { // we don't actually run this in the test, only compile
9//! let mut client = Client::connect("http://localhost:3842").await?;
10//! let req = WriteToPartitionRequest {
11//!   table_name: "my_table".to_string(),
12//!   partition: make_partition! {
13//!     "string_partition_col" => "my_partition_value".to_string(),
14//!   },
15//!   rows: vec![
16//!     make_row! {
17//!       "bool_col" => false,
18//!       "f32_col" => 1.1_f32,
19//!     }
20//!   ],
21//! };
22//! let resp: WriteToPartitionResponse = client.write_to_partition(req).await?;
23//! # Ok::<(), ClientError>(())
24//! # };
25//! ```
26//!
27//! See [`Client`] for more details.
28#[doc = include_str!("../README.md")]
29
30pub use types::SegmentKey;
31pub use utils::new_correlation_id;
32
33pub mod errors;
34pub mod row_helpers;
35pub mod partition_helpers;
36
37pub use client::Client;
38
39mod types;
40mod utils;
41mod client;