Skip to main content

SqlHost

Trait SqlHost 

pub trait SqlHost:
    Send
    + Sync
    + 'static {
    // Required methods
    fn execute<'life0, 'async_trait>(
        &'life0 self,
        statements: Vec<SqlStatement>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<Vec<SqlValue>>>, String>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn storage_quota(&self) -> Result<StorageQuota, String>;
}
Expand description

SQL storage supplied by the host.

Required Methods§

fn execute<'life0, 'async_trait>( &'life0 self, statements: Vec<SqlStatement>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<Vec<SqlValue>>>, String>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Runs statements in order as one transaction: either every one applies or none does. Returns each statement’s rows, in the same order. An Err carries the host’s reason.

fn storage_quota(&self) -> Result<StorageQuota, String>

The most RE-VFS bytes this backend may hold, summed over every account. Asked at the start of each upload, so a host whose entitlements change answers with the current value. An Err refuses the upload: a host that cannot say is not taken to mean “no limit”.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§