Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (ResourceConnection $resourceConnection, DefinitionAggregator $definitionAggregator) | |
getTableOptions ($tableName, $resource) | |
readColumns ($tableName, $resource) | |
readIndexes ($tableName, $resource) | |
readReferences ($tableName, $resource) | |
getCreateTableSql ($tableName, $resource) | |
readConstraints ($tableName, $resource) | |
readTables ($resource) | |
Data Fields | |
const | MYSQL_TABLE_TYPE = 'BASE TABLE' |
Definition at line 18 of file DbSchemaReader.php.
__construct | ( | ResourceConnection | $resourceConnection, |
DefinitionAggregator | $definitionAggregator | ||
) |
Constructor.
ResourceConnection | $resourceConnection | |
DefinitionAggregator | $definitionAggregator |
Definition at line 41 of file DbSchemaReader.php.
getCreateTableSql | ( | $tableName, | |
$resource | |||
) |
Retrieve Create table SQL, from SHOW CREATE TABLE query.
string | $tableName | |
string | $resource |
Definition at line 170 of file DbSchemaReader.php.
getTableOptions | ( | $tableName, | |
$resource | |||
) |
Show table options like engine, partitioning, etc.
string | $tableName | |
string | $resource |
Implements DbSchemaReaderInterface.
Definition at line 52 of file DbSchemaReader.php.
readColumns | ( | $tableName, | |
$resource | |||
) |
Prepare and fetch query: Describe {table_name}.
string | $tableName | |
string | $resource |
Implements DbSchemaReaderInterface.
Definition at line 85 of file DbSchemaReader.php.
readConstraints | ( | $tableName, | |
$resource | |||
) |
Reading DB constraints. Primary and unique constraints are always non_unique=0.
Read constraints from Magento tables.
string | $tableName | |
string | $resource |
Implements DbSchemaReaderInterface.
Definition at line 184 of file DbSchemaReader.php.
readIndexes | ( | $tableName, | |
$resource | |||
) |
Fetch all indexes from table.
string | $tableName | |
string | $resource |
Implements DbSchemaReaderInterface.
Definition at line 124 of file DbSchemaReader.php.
readReferences | ( | $tableName, | |
$resource | |||
) |
As MySQL has bug and do not show foreign keys during DESCRIBE and other directives required to take it from SHOW CREATE TABLE ... command
Read references (foreign keys) from Magento tables.
string | $tableName | |
string | $resource |
Implements DbSchemaReaderInterface.
Definition at line 156 of file DbSchemaReader.php.
readTables | ( | $resource | ) |
Return names of all tables from shard.
string | $resource | Shard name. |
Implements DbSchemaReaderInterface.
Definition at line 215 of file DbSchemaReader.php.
const MYSQL_TABLE_TYPE = 'BASE TABLE' |
Table type in information_schema.TABLES which allows to identify only tables and ignore views
Definition at line 23 of file DbSchemaReader.php.