Interface CollectionInterface
Represents a database schema collection
Used to access information about the tables, and other data in a database.
Namespace: Cake\Database\Schema
Method Summary
-
describe() public
Get the column metadata for a table.
-
listTables() public
Get the list of tables available in the current connection.
-
listTablesWithoutViews() public @method
Get the list of tables available in the current connection. This will exclude any views in the schema.
Method Detail
describe() ¶ public
describe(string $name, array<string, mixed> $options = []): Cake\Database\Schema\TableSchemaInterface
Get the column metadata for a table.
Caching will be applied if cacheMetadata
key is present in the Connection
configuration options. Defaults to _cakemodel when true.
Options
forceRefresh
- Set to true to force rebuilding the cached metadata. Defaults to false.
Parameters
-
string
$name The name of the table to describe.
-
array<string, mixed>
$options optional The options to use, see above.
Returns
Cake\Database\Schema\TableSchemaInterface
Throws
Cake\Database\Exception\DatabaseException
when table cannot be described.
listTables() ¶ public
listTables(): array<string>
Get the list of tables available in the current connection.
Returns
array<string>
listTablesWithoutViews() ¶ public @method
listTablesWithoutViews(): array<string>
Get the list of tables available in the current connection. This will exclude any views in the schema.
Returns
array<string>