(沒有可用的版本資訊,可能僅在 Git 中)
Schema::getSession — 取得 schema session
此函數沒有參數。
一個 Session 物件。
範例 #1 mysql_xdevapi\Schema::getSession() 範例
<?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");
// ...
$newsession = $schema->getSession();
var_dump($session);
var_dump($newsession);
?>
以上範例將輸出類似於以下的內容
object(mysql_xdevapi\Session)#1 (0) { } object(mysql_xdevapi\Session)#3 (0) { }