pub struct Client { /* private fields */ }Expand description
Client which is used to query picodata.
Implementations§
Source§impl Client
impl Client
Sourcepub async fn new_with_strategy<S>(
config: Config,
strategy: S,
) -> Result<Self, Error>where
S: Strategy,
pub async fn new_with_strategy<S>(
config: Config,
strategy: S,
) -> Result<Self, Error>where
S: Strategy,
Sourcepub fn query<'a>(
&'a self,
sql: &'a str,
params: &'a [&'a (dyn ToSql + Sync)],
) -> Query<'a, Vec<Row>>
pub fn query<'a>( &'a self, sql: &'a str, params: &'a [&'a (dyn ToSql + Sync)], ) -> Query<'a, Vec<Row>>
Query picodata cluster. Returns a builder that supports
.on_master(bool), .bucket_id(u64) and .instance(&str) before .await.
Sourcepub fn execute<'a>(
&'a self,
sql: &'a str,
params: &'a [&'a (dyn ToSql + Sync)],
) -> Query<'a, u64>
pub fn execute<'a>( &'a self, sql: &'a str, params: &'a [&'a (dyn ToSql + Sync)], ) -> Query<'a, u64>
Execute on picodata cluster. Returns a builder that supports
.on_master(bool), .bucket_id(u64) and .instance(&str) before .await.
Sourcepub async fn topology(&self) -> Result<Topology, Error>
pub async fn topology(&self) -> Result<Topology, Error>
Returns a snapshot of the cluster topology. Tier::bucket_map
checks a tier’s buckets.
§Errors
Returns Error::Closed if the client has been closed.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more