pub struct MongrelClient { /* private fields */ }Implementations§
Source§impl MongrelClient
impl MongrelClient
pub fn try_with_bearer_token(self, token: impl AsRef<str>) -> ClientResult<Self>
pub fn with_bearer_token(self, token: impl AsRef<str>) -> ClientResult<Self>
pub fn try_with_basic_auth( self, username: impl AsRef<str>, password: impl AsRef<str>, ) -> ClientResult<Self>
pub fn with_basic_auth( self, username: impl AsRef<str>, password: impl AsRef<str>, ) -> ClientResult<Self>
Source§impl MongrelClient
impl MongrelClient
pub fn builder(url: impl AsRef<str>) -> MongrelClientBuilder
pub fn new(url: &str) -> ClientResult<Self>
pub fn with_options( url: impl AsRef<str>, options: RemoteOptions, ) -> ClientResult<Self>
pub fn health(&self) -> ClientResult<String>
pub fn capabilities(&self) -> ClientResult<ServerCapabilities>
pub fn sql_cancellation_capabilities( &self, ) -> ClientResult<SqlCancellationCapabilities>
pub fn sql_idempotency_capabilities( &self, ) -> ClientResult<SqlIdempotencyCapabilities>
pub fn sql_pagination_capabilities( &self, ) -> ClientResult<SqlPaginationCapabilities>
pub fn set_history_retention_epochs( &self, epochs: u64, ) -> ClientResult<HistoryRetention>
pub fn history_retention_epochs(&self) -> ClientResult<u64>
pub fn earliest_retained_epoch(&self) -> ClientResult<u64>
pub fn list_tables(&self) -> ClientResult<Vec<String>>
pub fn create_table( &self, name: &str, columns: Vec<ColumnDefJson>, ) -> ClientResult<u64>
pub fn drop_table(&self, name: &str) -> ClientResult<()>
pub fn count(&self, table: &str) -> ClientResult<u64>
pub fn put(&self, table: &str, row: Vec<(u16, Value)>) -> ClientResult<u64>
pub fn commit(&self, table: &str) -> ClientResult<u64>
pub fn sql(&self, sql: &str) -> ClientResult<Vec<RecordBatch>>
pub fn sql_with_options( &self, sql: &str, options: SqlClientOptions, ) -> ClientResult<Vec<RecordBatch>>
pub fn sql_write_idempotent( &self, sql: &str, idempotency_key: impl Into<String>, ) -> ClientResult<RemoteSqlReceipt>
pub fn sql_write_idempotent_with_options( &self, sql: &str, idempotency_key: impl Into<String>, options: SqlClientOptions, ) -> ClientResult<RemoteSqlReceipt>
pub fn sql_page( &self, sql: &str, options: SqlPageOptions, ) -> ClientResult<RemoteSqlPage>
pub fn continue_sql_page( &self, cursor: &str, options: RemoteSqlControlOptions, ) -> ClientResult<RemoteSqlPage>
pub fn start_sql( &self, sql: impl Into<String>, options: SqlClientOptions, ) -> ClientResult<RemoteSqlQueryHandle>
pub fn cancel_sql(&self, query_id: QueryId) -> ClientResult<RemoteCancelOutcome>
pub fn query_status(&self, query_id: QueryId) -> ClientResult<RemoteQueryStatus>
pub fn txn(&self, ops: Vec<TxnOp>) -> ClientResult<()>
Sourcepub fn kit_schema(&self, table: &str) -> ClientResult<TableSchemaInfo>
pub fn kit_schema(&self, table: &str) -> ClientResult<TableSchemaInfo>
Fetch one table’s schema + constraint metadata (GET /kit/schema/{t}).
Sourcepub fn kit_txn(&self, req: &KitTxnRequest) -> ClientResult<KitTxnResponse>
pub fn kit_txn(&self, req: &KitTxnRequest) -> ClientResult<KitTxnResponse>
Run a typed atomic batch (POST /kit/txn). Constraint violations and
conflicts return ClientError::Kit with the matching code.
Sourcepub fn kit_query(&self, req: &KitQueryRequest) -> ClientResult<KitQueryResponse>
pub fn kit_query(&self, req: &KitQueryRequest) -> ClientResult<KitQueryResponse>
Run a native typed query (POST /kit/query) returning physical row ids
and typed cells. Conditions intersect in the row-id space; this is the
native counterpart to SQL reads (which hide row ids).
pub fn kit_retrieve( &self, req: &KitRetrieveRequest, ) -> ClientResult<KitRetrieveResponse>
pub fn kit_retrieve_with_options( &self, req: &KitRetrieveRequest, options: &AiExecutionOptions, ) -> ClientResult<KitRetrieveResponse>
pub fn kit_ann_rerank( &self, req: &KitAnnRerankRequest, ) -> ClientResult<KitAnnRerankResponse>
pub fn kit_ann_rerank_with_options( &self, req: &KitAnnRerankRequest, options: &AiExecutionOptions, ) -> ClientResult<KitAnnRerankResponse>
pub fn kit_set_similarity( &self, req: &KitSetSimilarityRequest, ) -> ClientResult<KitSetSimilarityResponse>
pub fn kit_set_similarity_with_options( &self, req: &KitSetSimilarityRequest, options: &AiExecutionOptions, ) -> ClientResult<KitSetSimilarityResponse>
pub fn kit_search( &self, req: &KitSearchRequest, ) -> ClientResult<KitSearchResponse>
pub fn kit_ai_metrics(&self) -> ClientResult<Value>
Sourcepub fn kit_create_table(&self, body: &Value) -> ClientResult<u64>
pub fn kit_create_table(&self, body: &Value) -> ClientResult<u64>
Create a constraint-bearing table over HTTP (POST /kit/create_table).
body is the full request JSON — {name, columns:[{id,name,ty, primary_key,nullable,auto_increment,…}], constraints:{uniques,…, foreign_keys,…, checks:[{id,name,expr}]}}. Returns the assigned table id.
pub fn procedures(&self) -> ClientResult<Vec<StoredProcedure>>
pub fn procedure(&self, name: &str) -> ClientResult<StoredProcedure>
pub fn create_procedure( &self, procedure: StoredProcedure, ) -> ClientResult<StoredProcedure>
pub fn replace_procedure( &self, name: &str, procedure: StoredProcedure, ) -> ClientResult<StoredProcedure>
pub fn drop_procedure(&self, name: &str) -> ClientResult<()>
pub fn call_procedure( &self, name: &str, req: &ProcedureCallRequest, ) -> ClientResult<ProcedureCallResponse>
pub fn kit_call_procedure( &self, name: &str, req: &ProcedureCallRequest, ) -> ClientResult<ProcedureCallResponse>
pub fn triggers(&self) -> ClientResult<Vec<StoredTrigger>>
pub fn trigger(&self, name: &str) -> ClientResult<StoredTrigger>
pub fn create_trigger( &self, trigger: StoredTrigger, ) -> ClientResult<StoredTrigger>
pub fn create_trigger_with_idempotency_key( &self, trigger: StoredTrigger, idempotency_key: Option<impl Into<String>>, ) -> ClientResult<StoredTrigger>
pub fn replace_trigger( &self, name: &str, trigger: StoredTrigger, ) -> ClientResult<StoredTrigger>
pub fn replace_trigger_with_idempotency_key( &self, name: &str, trigger: StoredTrigger, idempotency_key: Option<impl Into<String>>, ) -> ClientResult<StoredTrigger>
pub fn drop_trigger(&self, name: &str) -> ClientResult<()>
pub fn drop_trigger_with_idempotency_key( &self, name: &str, idempotency_key: Option<impl Into<String>>, ) -> ClientResult<()>
Trait Implementations§
Source§impl Clone for MongrelClient
impl Clone for MongrelClient
Source§fn clone(&self) -> MongrelClient
fn clone(&self) -> MongrelClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for MongrelClient
impl !UnwindSafe for MongrelClient
impl Freeze for MongrelClient
impl Send for MongrelClient
impl Sync for MongrelClient
impl Unpin for MongrelClient
impl UnsafeUnpin for MongrelClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more