Represents a database schema collection
Used to access information about the tables, and other data in a database.
Cake\Database\Connection
Connection object
Cake\Database\Schema\SchemaDialect
Schema dialect instance.
Constructor.
Helper method for running each step of the reflection process.
Get the column metadata for a table.
Get the list of tables and views available in the current connection.
Get the list of tables, excluding any views, available in the current connection.
__construct(Cake\Database\Connection $connection)
Constructor.
Cake\Database\Connection
$connection The connection instance.
_reflect(string $stage, string $name, array<string, mixed> $config, Cake\Database\Schema\TableSchema $schema): void
Helper method for running each step of the reflection process.
string
$stage The stage name.
string
$name The table name.
array<string, mixed>
$config The config data.
Cake\Database\Schema\TableSchema
$schema The table schema instance.
void
Cake\Database\Exception\DatabaseException
describe(string $name, array<string, mixed> $options = []): Cake\Database\Schema\TableSchema
Get the column metadata for a table.
The name can include a database schema name in the form 'schema.table'.
Caching will be applied if cacheMetadata
key is present in the Connection configuration options. Defaults to _cakemodel when true.
forceRefresh
- Set to true to force rebuilding the cached metadata. Defaults to false.string
$name The name of the table to describe.
array<string, mixed>
$options optional The options to use, see above.
Cake\Database\Schema\TableSchema
Cake\Database\Exception\DatabaseException
listTables(): array<string>
Get the list of tables and views available in the current connection.
array<string>
listTablesWithoutViews(): array<string>
Get the list of tables, excluding any views, available in the current connection.
array<string>
Connection object
Cake\Database\Connection
Schema dialect instance.
Cake\Database\Schema\SchemaDialect
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Database.Schema.Collection.html