(No version information available, might only be in Git)
Schema::getCollection — Get collection from schema
Get a collection from the schema.
name
Collection name to retrieve.
The Collection object for the selected collection.
Example #1 mysql_xdevapi\Schema::getCollection() example
<?php
$session = mysql_xdevapi\getSession("mysqlx://user:password@localhost");
$session->sql("DROP DATABASE IF EXISTS food")->execute();
$session->sql("CREATE DATABASE food")->execute();
$schema = $session->getSchema("food");
$schema->createCollection("trees");
/ ...
$trees = $schema->getCollection("trees");
var_dump($trees);
The above example will output something similar to:
object(mysql_xdevapi\Collection)#3 (1) { ["name"]=> string(5) "trees" }
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant