Trait wasmcloud_interface_sqldb::SqlDb
source · pub trait SqlDb {
// Required methods
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 Statement
) -> Pin<Box<dyn Future<Output = RpcResult<ExecuteResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn query<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 Statement
) -> Pin<Box<dyn Future<Output = RpcResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn contract_id() -> &'static str { ... }
}
Expand description
SqlDb - SQL Database connections To use this capability, the actor must be linked with the capability contract “wasmcloud:sqldb” wasmbus.contractId: wasmcloud:sqldb wasmbus.providerReceive
Required Methods§
sourcefn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 Statement
) -> Pin<Box<dyn Future<Output = RpcResult<ExecuteResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context, arg: &'life2 Statement ) -> Pin<Box<dyn Future<Output = RpcResult<ExecuteResult>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Execute an sql statement
sourcefn query<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 Statement
) -> Pin<Box<dyn Future<Output = RpcResult<QueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn query<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context, arg: &'life2 Statement ) -> Pin<Box<dyn Future<Output = RpcResult<QueryResult>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Perform select query on database, returning all result rows
Provided Methods§
sourcefn contract_id() -> &'static str
fn contract_id() -> &'static str
returns the capability contract id for this interface