array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'mysql-xdevapi-schema.dropcollection.php', 1 => 'Schema::dropCollection', ), 'up' => array ( 0 => 'class.mysql-xdevapi-schema.php', 1 => 'mysql_xdevapi\\Schema', ), 'prev' => array ( 0 => 'mysql-xdevapi-schema.createcollection.php', 1 => 'Schema::createCollection', ), 'next' => array ( 0 => 'mysql-xdevapi-schema.existsindatabase.php', 1 => 'Schema::existsInDatabase', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/mysql_xdevapi/mysql_xdevapi/schema/dropcollection.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(No version information available, might only be in Git)
Schema::dropCollection — スキーマからコレクションを削除する
この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。
collection_name
例1 mysql_xdevapi\Schema::dropCollection() の例
<?php
$session = mysql_xdevapi\getSession("mysqlx://user:password@localhost");
$session->sql("DROP DATABASE IF EXISTS food")->execute();
$session->sql("CREATE DATABASE food")->execute();
$session->sql("CREATE TABLE food.fruit(name text, rating text)")->execute();
$schema = $session->getSchema("food");
$schema->createCollection("trees");
$schema->dropCollection("trees");
$schema->createCollection("buildings");
print_r($schema->gettables());
print_r($schema->getcollections());
上の例の出力は、 たとえば以下のようになります。
Array ( [fruit] => mysql_xdevapi\Table Object ( [name] => fruit ) ) Array ( [buildings] => mysql_xdevapi\Collection Object ( [name] => buildings ) )