« Session::generateUUID
Session::getSchema »

Session::getDefaultSchema

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

Session::getDefaultSchema — デフォルトのスキーマ名を取得する

説明

public function mysql_xdevapi\Session::getDefaultSchema(): ?mysql_xdevapi\Schema

通常接続URIに設定される、デフォルトのスキーマを取得します。

パラメータ

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

戻り値

接続に定義されているデフォルトのスキーマを返します。 設定されていない場合は、null を返します。

例

例1 mysql_xdevapi\Session::getSchema() の例

<?php
$uri = "mysqlx://testuser:testpasswd@localhost:33160/testx?ssl-mode=disabled";
$session = mysql_xdevapi\getSession($uri);

$schema = $session->getDefaultSchema();
echo $schema->getName();
?>

上の例の出力は以下となります。

testx
関連キーワード:
Session   スキーマ   mysql   xdevapi   getDefaultSchema   getSchema   接続   testx   session   schema   generateUUID   information   available   Schema   通常   mysqlx   testuser   testpasswd   localhost   mode   disabled   getSession   getName
関連する関数・ページ:
mysql-xdevapi-session.getschema   class.mysql-xdevapi-session   mysql-xdevapi-session.getschemas   mysql-xdevapi-session.dropschema   mysql-xdevapi-session.generateuuid   mysql-xdevapi-session.close