Spanner/src/Database.php
public function create(array $options = [])
    {
        $options += [
            'statements' => [],
        ];

        $databaseId = DatabaseAdminClient::parseName($this->name())['database'];
        $statement = sprintf('CREATE DATABASE `%s`', $databaseId);

        $operation = $this->connection->createDatabase([
            'instance' => $this->instance->name(),
            'createStatement' => $statement,
            'extraStatements' => $options['statements']
        ]);

        return $this->resumeOperation($operation['name'], $operation);
    }
public function create(array $options = [])
    {
        $options += [
            'statements' => [],
        ];

        $databaseId = DatabaseAdminClient::parseName($this->name())['database'];
        $statement = sprintf('CREATE DATABASE `%s`', $databaseId);

        $operation = $this->connection->createDatabase([
            'instance' => $this->instance->name(),
            'createStatement' => $statement,
            'extraStatements' => $options['statements']
        ]);

        return $this->resumeOperation($operation['name'], $operation);
    }
public function create ( array $ options = [ ] ) { $ options += [ 'statements' => [ ] , ] ; $ databaseId = DatabaseAdminClient :: parseName ( $ this -> name ( ) ) [ 'database' ] ; $ statement = sprintf ( 'CREATE DATABASE `%s`' , $ databaseId ) ; $ operation = $ this -> connection -> createDatabase ( [ 'instance' => $ this -> instance -> name ( ) , 'createStatement' => $ statement , 'extraStatements' => $ options [ 'statements' ] ] ) ; return $ this -> resumeOperation ( $ operation [ 'name' ] , $ operation ) ; }
Create a new Cloud Spanner database.

Example:
```
$operation = $database->create();
```

@codingStandardsIgnoreStart
@see https://cloud.google.com/spanner/reference/rpc/google.spanner.admin.database.v1#createdatabaserequest CreateDatabaseRequest
@codingStandardsIgnoreEnd

@param array $options [optional] {
Configuration Options

@type string[] $statements Additional DDL statements.
}
@return LongRunningOperation<Database>
Create a new Cloud Spanner database .