« Schema::getCollections
Schema::getSession »

Schema::getName

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

Schema::getName — スキーマの名前を取得する

説明

public function mysql_xdevapi\Schema::getName(): string

スキーマの名前を取得します

パラメータ

この関数にはパラメータはありません。

戻り値

スキーマオブジェクトに接続しているスキーマの名前を文字列として返します。

例

例1 mysql_xdevapi\Schema::getName() の例

<?php
$session = mysql_xdevapi\getSession("mysqlx://user:password@localhost");
$session->sql("DROP DATABASE IF EXISTS addressbook")->execute();
$session->sql("CREATE DATABASE addressbook")->execute();

$schema  = $session->getSchema("addressbook");

// ...

var_dump($schema->getName());
?>

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

string(11) "addressbook"
関連キーワード:
Schema   スキーマ   getName   mysql   xdevapi   session   addressbook   getSession   execute   schema   getCollections   information   available   接続   mysqlx   user   password   localhost   getSchema   dump
関連する関数・ページ:
mysql-xdevapi-schema.getsession   mysql-xdevapi-schema.gettable   class.mysql-xdevapi-schema   mysql-xdevapi-schema.getcollections   mysql-xdevapi-schema.construct   mysql-xdevapi-session.getschema