Create new schema

# Session::createSchema

(No version information available, might only be in Git)

Session::createSchema — Create new schema

### 説明

public mysql_xdevapi\Session::createSchema ( string `$schema_name` ) : mysql_xdevapi\Schema

Creates a new schema.

### パラメータ

`schema_name`

  Name of the schema to create.

### 返り値

A Schema object on success, and emits an exception on failure.

### 例

例1 mysql_xdevapi\Session::createSchema() example

`<?php
$uri = 'mysqlx://happyuser:password@127.0.0.1:33060/';
$sess = mysql_xdevapi\getSession($uri);
try {
if ($schema = $sess->createSchema('fruit')) {
echo "Info: I created a schema named 'fruit'\n";
}
} catch (Exception $e) {
echo $e->getMessage();
}
?>`

上の例の出力は、 たとえば以下のようになります。

    Info: I created a schema named 'fruit'