CollectionInterface
in
Represents a database schema collection
Used to access information about the tables, and other data in a database.
Table of Contents
Methods
- describe() : TableSchemaInterface
- Get the column metadata for a table.
- listTables() : array<string|int, string>
- Get the list of tables available in the current connection.
Methods
describe()
Get the column metadata for a table.
public
describe(string $name[, array<string, mixed> $options = [] ]) : TableSchemaInterface
Caching will be applied if cacheMetadata
key is present in the Connection
configuration options. Defaults to cake_model when true.
Options
-
forceRefresh
- Set to true to force rebuilding the cached metadata. Defaults to false.
Parameters
- $name : string
-
The name of the table to describe.
- $options : array<string, mixed> = []
-
The options to use, see above.
Tags
Return values
TableSchemaInterface —Object with column metadata.
listTables()
Get the list of tables available in the current connection.
public
listTables() : array<string|int, string>
Return values
array<string|int, string> —The list of tables in the connected database/schema.