class Schema implements DatabaseObject (View source)

Class Schema

Properties

$name

Methods

createCollection(string $name)

Create a collection within the schema.

bool
dropCollection(string $collection_name)

Drop collection from schema

bool
existsInDatabase()

Check if exists in database Checks if the current object (schema, table, collection, or view) exists in the schema object.

getCollection(string $name)

Get a collection from the schema.

getCollectionAsTable(string $name)

Get a collection, but as a Table object instead of a Collection object.

array
getCollections()

Fetch a list of collections for this schema.

string
getName()

Get the name of the schema.

getSession()

Get a new Session object from the Schema object.

getTable(string $name)

Fetch a Table object for the provided table in the schema.

array
getTables()

Get schema tables

Details

Collection createCollection(string $name)

Create a collection within the schema.

Parameters

string $name

Return Value

Collection

bool dropCollection(string $collection_name)

Drop collection from schema

Parameters

string $collection_name

Return Value

bool

bool existsInDatabase()

Check if exists in database Checks if the current object (schema, table, collection, or view) exists in the schema object.

Return Value

bool

Collection getCollection(string $name)

Get a collection from the schema.

Parameters

string $name

Return Value

Collection

Table getCollectionAsTable(string $name)

Get a collection, but as a Table object instead of a Collection object.

Parameters

string $name

Return Value

Table

array getCollections()

Fetch a list of collections for this schema.

Return Value

array

Array of all collections in this schema, where each array element value is a Collection object with the collection name as the key.

string getName()

Get the name of the schema.

Return Value

string

Session getSession()

Get a new Session object from the Schema object.

Return Value

Session

Table getTable(string $name)

Fetch a Table object for the provided table in the schema.

Parameters

string $name

Return Value

Table

array getTables()

Get schema tables

Return Value

array

Array of all tables in this schema, where each array element value is a Table object with the table name as the key.