Trait pliantdb_core::connection::ServerConnection[][src]

pub trait ServerConnection: Send + Sync {
    fn create_database_with_schema<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        schema: SchemaName
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn delete_database<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn list_databases<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Database>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn list_available_schemas<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SchemaName>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn create_database<'life0, 'life1, 'async_trait, DB: Schema>(
        &'life0 self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        DB: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... } }
Expand description

Functions for interacting with a multi-database PliantDb instance.

Required methods

Creates a database named name using the SchemaName schema.

Errors

  • Error::InvalidDatabaseName: name must begin with an alphanumeric character ([a-zA-Z0-9]), and all remaining characters must be alphanumeric, a period (.), or a hyphen (-).
  • [Error::DatabaseNameAlreadyTaken]: name` was already used for a previous database name. Database names are case insensitive.

Deletes a database named name.

Errors

Lists the databases on this server.

Lists the SchemaNames on this server.

Provided methods

Creates a database named name with the Schema provided.

Errors

  • Error::InvalidDatabaseName: name must begin with an alphanumeric character ([a-zA-Z0-9]), and all remaining characters must be alphanumeric, a period (.), or a hyphen (-).
  • [Error::DatabaseNameAlreadyTaken]: name` was already used for a previous database name. Database names are case insensitive.

Implementors