pub struct IcDbmsAgentClient<'a> { /* private fields */ }Available on crate feature
ic-agent only.Expand description
Client to interact with an IC DBMS Canister using ic-agent.
Implementations§
Source§impl<'a> IcDbmsAgentClient<'a>
impl<'a> IcDbmsAgentClient<'a>
Trait Implementations§
Source§impl Client for IcDbmsAgentClient<'_>
impl Client for IcDbmsAgentClient<'_>
Source§async fn acl_add_principal(
&self,
principal: Principal,
) -> IcDbmsCanisterClientResult<IcDbmsResult<()>>
async fn acl_add_principal( &self, principal: Principal, ) -> IcDbmsCanisterClientResult<IcDbmsResult<()>>
Adds the given principal to the ACL of the canister.
Source§async fn acl_remove_principal(
&self,
principal: Principal,
) -> IcDbmsCanisterClientResult<IcDbmsResult<()>>
async fn acl_remove_principal( &self, principal: Principal, ) -> IcDbmsCanisterClientResult<IcDbmsResult<()>>
Removes the given principal from the ACL of the canister.
Source§async fn acl_allowed_principals(
&self,
) -> IcDbmsCanisterClientResult<Vec<Principal>>
async fn acl_allowed_principals( &self, ) -> IcDbmsCanisterClientResult<Vec<Principal>>
Lists all principals in the ACL of the canister.
Source§async fn begin_transaction(&self) -> IcDbmsCanisterClientResult<TransactionId>
async fn begin_transaction(&self) -> IcDbmsCanisterClientResult<TransactionId>
Begins a new transaction and returns its ID.
Source§async fn commit(
&self,
transaction_id: TransactionId,
) -> IcDbmsCanisterClientResult<IcDbmsResult<()>>
async fn commit( &self, transaction_id: TransactionId, ) -> IcDbmsCanisterClientResult<IcDbmsResult<()>>
Commits the transaction with the given ID.
Source§async fn rollback(
&self,
transaction_id: TransactionId,
) -> IcDbmsCanisterClientResult<IcDbmsResult<()>>
async fn rollback( &self, transaction_id: TransactionId, ) -> IcDbmsCanisterClientResult<IcDbmsResult<()>>
Rolls back the transaction with the given ID.
Source§async fn select<T>(
&self,
table: &str,
query: Query,
transaction_id: Option<TransactionId>,
) -> IcDbmsCanisterClientResult<IcDbmsResult<Vec<T::Record>>>
async fn select<T>( &self, table: &str, query: Query, transaction_id: Option<TransactionId>, ) -> IcDbmsCanisterClientResult<IcDbmsResult<Vec<T::Record>>>
Executes a
SELECT query on the IC DBMS Canister.Source§async fn select_raw(
&self,
table: &str,
query: Query,
transaction_id: Option<TransactionId>,
) -> IcDbmsCanisterClientResult<IcDbmsResult<Vec<Vec<(CandidColumnDef, Value)>>>>
async fn select_raw( &self, table: &str, query: Query, transaction_id: Option<TransactionId>, ) -> IcDbmsCanisterClientResult<IcDbmsResult<Vec<Vec<(CandidColumnDef, Value)>>>>
Executes a
SELECT query on the IC DBMS Canister and returns raw records (without deserialization).Source§async fn insert<T>(
&self,
table: &str,
record: T::Insert,
transaction_id: Option<TransactionId>,
) -> IcDbmsCanisterClientResult<IcDbmsResult<()>>
async fn insert<T>( &self, table: &str, record: T::Insert, transaction_id: Option<TransactionId>, ) -> IcDbmsCanisterClientResult<IcDbmsResult<()>>
Executes an
INSERT query on the IC DBMS Canister.Source§async fn update<T>(
&self,
table: &str,
patch: T::Update,
transaction_id: Option<TransactionId>,
) -> IcDbmsCanisterClientResult<IcDbmsResult<u64>>
async fn update<T>( &self, table: &str, patch: T::Update, transaction_id: Option<TransactionId>, ) -> IcDbmsCanisterClientResult<IcDbmsResult<u64>>
Executes an
UPDATE query on the IC DBMS Canister.Source§async fn delete<T>(
&self,
table: &str,
behaviour: DeleteBehavior,
filter: Option<Filter>,
transaction_id: Option<TransactionId>,
) -> IcDbmsCanisterClientResult<IcDbmsResult<u64>>where
T: TableSchema,
async fn delete<T>(
&self,
table: &str,
behaviour: DeleteBehavior,
filter: Option<Filter>,
transaction_id: Option<TransactionId>,
) -> IcDbmsCanisterClientResult<IcDbmsResult<u64>>where
T: TableSchema,
Executes a
DELETE query on the IC DBMS Canister.Source§impl<'a> Clone for IcDbmsAgentClient<'a>
impl<'a> Clone for IcDbmsAgentClient<'a>
Source§fn clone(&self) -> IcDbmsAgentClient<'a>
fn clone(&self) -> IcDbmsAgentClient<'a>
Returns a duplicate of the value. Read more
1.0.0 · 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<'a> Freeze for IcDbmsAgentClient<'a>
impl<'a> !RefUnwindSafe for IcDbmsAgentClient<'a>
impl<'a> Send for IcDbmsAgentClient<'a>
impl<'a> Sync for IcDbmsAgentClient<'a>
impl<'a> Unpin for IcDbmsAgentClient<'a>
impl<'a> UnsafeUnpin for IcDbmsAgentClient<'a>
impl<'a> !UnwindSafe for IcDbmsAgentClient<'a>
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