Skip to main content

TableStore

Trait TableStore 

Source
pub trait TableStore: Send + Sync {
    // Required methods
    fn query(
        &self,
        cnn_name: String,
        query: String,
        params: Vec<DataType>,
    ) -> impl Future<Output = Result<Vec<Row>>> + Send;
    fn exec(
        &self,
        cnn_name: String,
        query: String,
        params: Vec<DataType>,
    ) -> impl Future<Output = Result<u32>> + Send;
}
Expand description

Trait for types that provide ORM database access.

Implement this trait to enable ORM operations. Default implementations use the WASI SQL bindings to execute queries.

Required Methods§

Source

fn query( &self, cnn_name: String, query: String, params: Vec<DataType>, ) -> impl Future<Output = Result<Vec<Row>>> + Send

Executes a query and returns the result rows.

Source

fn exec( &self, cnn_name: String, query: String, params: Vec<DataType>, ) -> impl Future<Output = Result<u32>> + Send

Executes a statement and returns the number of affected rows.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§