async fn create_database<DB: Schema>(
        &self,
        name: &str,
        only_if_needed: bool,
    ) -> Result<(), crate::Error> {
        self.create_database_with_schema(name, DB::schema_name()?, only_if_needed)
            .await
    }
/// 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. Returned
///   if `only_if_needed` is false.
Creates a database named `name` with the `Schema` provided.
Creates a database named ` name ` with the ` Schema ` provided .
async fn create_database<DB: Schema>(
        &self,
        name: &str,
        only_if_needed: bool,
    ) -> Result<(), crate::Error> {
        self.create_database_with_schema(name, DB::schema_name()?, only_if_needed)
            .await
    }
async fn create_database < DB : Schema > ( & self , name : & str , only_if_needed : bool , ) -> Result < ( ) , crate :: Error > { self . create_database_with_schema ( name , DB :: schema_name ( ) ? , only_if_needed ) . await }
Creates a database named `name` with the `Schema` provided.
Creates a database named ` name ` with the ` Schema ` provided .
&self
name
&str
only_if_needed
bool
&self
name
&str
only_if_needed
bool
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. Returned
if `only_if_needed` is false.
[ ` 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 . Returned if ` only_if_needed ` is false .