$_connection
$_connection : \Cake\Database\Connection
Connection object
Extends the schema collection class to provide caching
Used to access information about the tables, and other data in a database.
$_connection : \Cake\Database\Connection
Connection object
$_dialect : \Cake\Database\Schema\BaseSchema
Schema dialect instance.
__construct(\Cake\Datasource\ConnectionInterface $connection, string|boolean $cacheKey = true)
Constructor.
\Cake\Datasource\ConnectionInterface | $connection | The connection instance. |
string|boolean | $cacheKey | The cache key or boolean false to disable caching. |
describe(string $name, array $options = array()) : \Cake\Database\Schema\TableSchema
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.
forceRefresh
- Set to true to force rebuilding the cached metadata.
Defaults to false.string | $name | The name of the table to describe. |
array | $options | The options to use, see above. |
Object with column metadata.
cacheMetadata(boolean|null $enable = null) : string|boolean
Sets the cache config name to use for caching table metadata, or disables it if false is passed.
If called with no arguments it returns the current configuration name.
boolean|null | $enable | Whether or not to enable caching |
_reflect(string $stage, string $name, array $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 | $config | The config data. |
\Cake\Database\Schema\TableSchema | $schema | The table instance |
on query failure.
None found |
Loading…