Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Data Structures | |
class | ConnectionFactoryTest |
Public Member Functions | |
__construct (ResourceConfigInterface $resourceConfig, ConnectionFactoryInterface $connectionFactory, DeploymentConfig $deploymentConfig, $tablePrefix='') | |
getConnection ($resourceName=self::DEFAULT_CONNECTION) | |
closeConnection ($resourceName=self::DEFAULT_CONNECTION) | |
getConnectionByName ($connectionName) | |
getTableName ($modelEntity, $connectionName=self::DEFAULT_CONNECTION) | |
getTablePlaceholder ($tableName) | |
getTriggerName ($tableName, $time, $event) | |
setMappedTableName ($tableName, $mappedName) | |
getMappedTableName ($tableName) | |
getIdxName ( $tableName, $fields, $indexType=\Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX) | |
getFkName ($priTableName, $priColumnName, $refTableName, $refColumnName) | |
getSchemaName ($resourceName) | |
getTablePrefix () | |
Data Fields | |
const | AUTO_UPDATE_ONCE = 0 |
const | AUTO_UPDATE_NEVER = -1 |
const | AUTO_UPDATE_ALWAYS = 1 |
const | DEFAULT_CONNECTION = 'default' |
Protected Attributes | |
$connections = [] | |
$mappedTableNames | |
$config | |
$connectionFactory | |
$tablePrefix | |
Application provides ability to configure multiple connections to persistent storage. This class provides access to all these connections. @api
Definition at line 18 of file ResourceConnection.php.
__construct | ( | ResourceConfigInterface | $resourceConfig, |
ConnectionFactoryInterface | $connectionFactory, | ||
DeploymentConfig | $deploymentConfig, | ||
$tablePrefix = '' |
|||
) |
ResourceConfigInterface | $resourceConfig | |
ConnectionFactoryInterface | $connectionFactory | |
DeploymentConfig | $deploymentConfig | |
string | $tablePrefix |
Definition at line 72 of file ResourceConnection.php.
closeConnection | ( | $resourceName = self::DEFAULT_CONNECTION | ) |
Close connection.
string | $resourceName |
Definition at line 106 of file ResourceConnection.php.
getConnection | ( | $resourceName = self::DEFAULT_CONNECTION | ) |
Retrieve connection to resource specified by $resourceName.
string | $resourceName |
Definition at line 92 of file ResourceConnection.php.
getConnectionByName | ( | $connectionName | ) |
Retrieve connection by $connectionName.
string | $connectionName |
Definition at line 133 of file ResourceConnection.php.
getFkName | ( | $priTableName, | |
$priColumnName, | |||
$refTableName, | |||
$refColumnName | |||
) |
Retrieve 32bit UNIQUE HASH for a Table foreign key.
string | $priTableName | the target table name |
string | $priColumnName | the target table column name |
string | $refTableName | the reference table name |
string | $refColumnName | the reference table column name |
Definition at line 283 of file ResourceConnection.php.
getIdxName | ( | $tableName, | |
$fields, | |||
$indexType = \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX |
|||
) |
Retrieve 32bit UNIQUE HASH for a Table index.
string | $tableName | |
string|string[] | $fields | |
string | $indexType |
Definition at line 261 of file ResourceConnection.php.
getMappedTableName | ( | $tableName | ) |
Get mapped table name.
string | $tableName |
Definition at line 244 of file ResourceConnection.php.
getSchemaName | ( | $resourceName | ) |
Retrieve db name.
That name can be needed, when we do request in information_schema to identify db.
string | $resourceName |
Definition at line 301 of file ResourceConnection.php.
getTableName | ( | $modelEntity, | |
$connectionName = self::DEFAULT_CONNECTION |
|||
) |
Get resource table name, validated by db adapter.
string|string[] | $modelEntity | |
string | $connectionName |
Definition at line 173 of file ResourceConnection.php.
getTablePlaceholder | ( | $tableName | ) |
Gets table placeholder by table name.
string | $tableName |
Definition at line 205 of file ResourceConnection.php.
getTablePrefix | ( | ) |
Get table prefix.
Definition at line 316 of file ResourceConnection.php.
getTriggerName | ( | $tableName, | |
$time, | |||
$event | |||
) |
Build a trigger name.
string | $tableName | The table that is the subject of the trigger |
string | $time | Either "before" or "after" |
string | $event | The DB level event which activates the trigger, i.e. "update" or "insert" |
Definition at line 219 of file ResourceConnection.php.
setMappedTableName | ( | $tableName, | |
$mappedName | |||
) |
Set mapped table name.
string | $tableName | |
string | $mappedName |
Definition at line 232 of file ResourceConnection.php.
|
protected |
Definition at line 47 of file ResourceConnection.php.
|
protected |
Definition at line 54 of file ResourceConnection.php.
|
protected |
Definition at line 33 of file ResourceConnection.php.
|
protected |
Definition at line 40 of file ResourceConnection.php.
|
protected |
Definition at line 64 of file ResourceConnection.php.
const AUTO_UPDATE_ALWAYS = 1 |
Definition at line 24 of file ResourceConnection.php.
const AUTO_UPDATE_NEVER = -1 |
Definition at line 22 of file ResourceConnection.php.
const AUTO_UPDATE_ONCE = 0 |
Definition at line 20 of file ResourceConnection.php.
const DEFAULT_CONNECTION = 'default' |
Definition at line 26 of file ResourceConnection.php.