public function create(RetentionPolicy $retentionPolicy = null, $createIfNotExists = false)
    {
        if ($createIfNotExists) {
            trigger_error('The $createIfNotExists parameter to Database::create is deprecated', E_USER_DEPRECATED);
        }
        try {
            $query = sprintf('CREATE DATABASE "%s"', $this->name);

            $this->query($query);

            if ($retentionPolicy) {
                $this->createRetentionPolicy($retentionPolicy);
            }
        } catch (Exception $e) {
            throw new DatabaseException(
                sprintf('Failed to created database %s', $this->name),
                $e->getCode(),
                $e
            );
        }
    }
public function create(RetentionPolicy $retentionPolicy = null, $createIfNotExists = false)
    {
        if ($createIfNotExists) {
            trigger_error('The $createIfNotExists parameter to Database::create is deprecated', E_USER_DEPRECATED);
        }
        try {
            $query = sprintf('CREATE DATABASE "%s"', $this->name);

            $this->query($query);

            if ($retentionPolicy) {
                $this->createRetentionPolicy($retentionPolicy);
            }
        } catch (Exception $e) {
            throw new DatabaseException(
                sprintf('Failed to created database %s', $this->name),
                $e->getCode(),
                $e
            );
        }
    }
public function create ( RetentionPolicy $ retentionPolicy = null , $ createIfNotExists = false ) { if ( $ createIfNotExists ) { trigger_error ( 'The $createIfNotExists parameter to Database::create is deprecated' , E_USER_DEPRECATED ) ; } try { $ query = sprintf ( 'CREATE DATABASE "%s"' , $ this -> name ) ; $ this -> query ( $ query ) ; if ( $ retentionPolicy ) { $ this -> createRetentionPolicy ( $ retentionPolicy ) ; } } catch ( Exception $ e ) { throw new DatabaseException ( sprintf ( 'Failed to created database %s' , $ this -> name ) , $ e -> getCode ( ) , $ e ) ; } }
Create this database

@param  RetentionPolicy $retentionPolicy
@param  bool            $createIfNotExists Deprecated parameter - to be removed
@return ResultSet
@throws DatabaseException
Create this database