Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
setTransactionIsolationLevel ($level=null) | |
isConnected () | |
closeConnection () | |
prepare ($sql) | |
lastInsertId ($tableName=null, $primaryKey=null) | |
insert ($table, array $bind) | |
listTables () | |
describeTable ($tableName, $schemaName=null) | |
setFetchMode ($mode) | |
limit ($sql, $count, $offset=0) | |
supportsParameters ($type) | |
getServerVersion () | |
![]() | |
__construct ($config) | |
getConnection () | |
getConfig () | |
setProfiler ($profiler) | |
getProfiler () | |
getStatementClass () | |
setStatementClass ($class) | |
query ($sql, $bind=array()) | |
beginTransaction () | |
commit () | |
rollBack () | |
insert ($table, array $bind) | |
update ($table, array $bind, $where='') | |
delete ($table, $where='') | |
select () | |
getFetchMode () | |
fetchAll ($sql, $bind=array(), $fetchMode=null) | |
fetchRow ($sql, $bind=array(), $fetchMode=null) | |
fetchAssoc ($sql, $bind=array()) | |
fetchCol ($sql, $bind=array()) | |
fetchPairs ($sql, $bind=array()) | |
fetchOne ($sql, $bind=array()) | |
quote ($value, $type=null) | |
quoteInto ($text, $value, $type=null, $count=null) | |
quoteIdentifier ($ident, $auto=false) | |
quoteColumnAs ($ident, $alias, $auto=false) | |
quoteTableAs ($ident, $alias=null, $auto=false) | |
getQuoteIdentifierSymbol () | |
lastSequenceId ($sequenceName) | |
nextSequenceId ($sequenceName) | |
foldCase ($key) | |
__sleep () | |
__wakeup () | |
listTables () | |
describeTable ($tableName, $schemaName=null) | |
isConnected () | |
closeConnection () | |
prepare ($sql) | |
lastInsertId ($tableName=null, $primaryKey=null) | |
setFetchMode ($mode) | |
limit ($sql, $count, $offset=0) | |
supportsParameters ($type) | |
getServerVersion () | |
Protected Member Functions | |
_connect () | |
_checkRequiredOptions (array $config) | |
_quote ($value) | |
_beginTransaction () | |
_commit () | |
_rollBack () | |
![]() | |
_checkRequiredOptions (array $config) | |
_whereExpr ($where) | |
_quote ($value) | |
_quoteIdentifierAs ($ident, $alias=null, $auto=false, $as=' AS ') | |
_quoteIdentifier ($value, $auto=false) | |
_connect () | |
_beginTransaction () | |
_commit () | |
_rollBack () | |
Protected Attributes | |
$_config | |
$_lastInsertId | |
$_lastInsertSQL = 'SELECT SCOPE_IDENTITY() as Current_Identity' | |
$_numericDataTypes | |
$_defaultStmtClass = 'Zend_Db_Statement_Sqlsrv' | |
![]() | |
$_config = array() | |
$_fetchMode = Zend_Db::FETCH_ASSOC | |
$_profiler | |
$_defaultStmtClass = 'Zend_Db_Statement' | |
$_defaultProfilerClass = 'Zend_Db_Profiler' | |
$_connection = null | |
$_caseFolding = Zend_Db::CASE_NATURAL | |
$_autoQuoteIdentifiers = true | |
$_numericDataTypes | |
$_allowSerialization = true | |
$_autoReconnectOnUnserialize = false | |
Definition at line 40 of file Sqlsrv.php.
|
protected |
Leave autocommit mode and begin a transaction.
Zend_Db_Adapter_Sqlsrv_Exception |
Definition at line 527 of file Sqlsrv.php.
|
protected |
Check for config options that are mandatory. Throw exceptions if any are missing.
array | $config |
Zend_Db_Adapter_Exception |
Definition at line 179 of file Sqlsrv.php.
|
protected |
Commit a transaction and return to autocommit mode.
Zend_Db_Adapter_Sqlsrv_Exception |
Definition at line 541 of file Sqlsrv.php.
|
protected |
Creates a connection resource.
Zend_Db_Adapter_Sqlsrv_Exception |
Definition at line 113 of file Sqlsrv.php.
|
protected |
Quote a raw string.
string | $value | Raw string |
Definition at line 309 of file Sqlsrv.php.
|
protected |
Roll back a transaction and return to autocommit mode.
Zend_Db_Adapter_Sqlsrv_Exception |
Definition at line 555 of file Sqlsrv.php.
closeConnection | ( | ) |
describeTable | ( | $tableName, | |
$schemaName = null |
|||
) |
Returns the column descriptions for a table.
The return value is an associative array keyed by the column name, as returned by the RDBMS.
The value of each array element is an associative array with the following keys:
SCHEMA_NAME => string; name of schema TABLE_NAME => string; COLUMN_NAME => string; column name COLUMN_POSITION => number; ordinal position of column in table DATA_TYPE => string; SQL datatype name of column DEFAULT => string; default expression of column, null if none NULLABLE => boolean; true if column can have nulls LENGTH => number; length of CHAR/VARCHAR SCALE => number; scale of NUMERIC/DECIMAL PRECISION => number; precision of NUMERIC/DECIMAL UNSIGNED => boolean; unsigned property of an integer type PRIMARY => boolean; true if column is part of the primary key PRIMARY_POSITION => integer; position of column in primary key IDENTITY => integer; true if column is auto-generated with unique values
string | $tableName | |
string | $schemaName | OPTIONAL |
Discover metadata information about this table.
Discover primary key column(s) for this table.
Definition at line 433 of file Sqlsrv.php.
getServerVersion | ( | ) |
insert | ( | $table, | |
array | $bind | ||
) |
Inserts a table row with specified data.
mixed | $table | The table to insert data into. |
array | $bind | Column-value pairs. |
Definition at line 358 of file Sqlsrv.php.
isConnected | ( | ) |
lastInsertId | ( | $tableName = null , |
|
$primaryKey = null |
|||
) |
Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column.
As a convention, on RDBMS brands that support sequences (e.g. Oracle, PostgreSQL, DB2), this method forms the name of a sequence from the arguments and returns the last id generated by that sequence. On RDBMS brands that support IDENTITY/AUTOINCREMENT columns, this method returns the last value generated for such a column, and the table name argument is disregarded.
string | $tableName | OPTIONAL Name of table. |
string | $primaryKey | OPTIONAL Name of primary key column. |
Definition at line 335 of file Sqlsrv.php.
limit | ( | $sql, | |
$count, | |||
$offset = 0 |
|||
) |
Adds an adapter-specific LIMIT clause to the SELECT statement.
string | $sql | |
integer | $count | |
integer | $offset | OPTIONAL |
Zend_Db_Adapter_Sqlsrv_Exception |
Definition at line 601 of file Sqlsrv.php.
listTables | ( | ) |
Returns a list of the tables in the database.
Definition at line 396 of file Sqlsrv.php.
prepare | ( | $sql | ) |
Returns an SQL statement for preparation.
string | $sql | The SQL statement with placeholders. |
Definition at line 285 of file Sqlsrv.php.
setFetchMode | ( | $mode | ) |
Set the fetch mode.
integer | $mode | A fetch mode. |
Zend_Db_Adapter_Sqlsrv_Exception |
Definition at line 572 of file Sqlsrv.php.
setTransactionIsolationLevel | ( | $level = null | ) |
Set the transaction isoltion level.
integer | null | $level | A fetch mode from SQLSRV_TXN_*. |
Zend_Db_Adapter_Sqlsrv_Exception |
Definition at line 214 of file Sqlsrv.php.
supportsParameters | ( | $type | ) |
Check if the adapter supports real SQL parameters.
string | $type | 'positional' or 'named' |
Definition at line 653 of file Sqlsrv.php.
|
protected |
Definition at line 53 of file Sqlsrv.php.
|
protected |
Definition at line 105 of file Sqlsrv.php.
|
protected |
Definition at line 64 of file Sqlsrv.php.
|
protected |
Definition at line 71 of file Sqlsrv.php.
|
protected |
Definition at line 84 of file Sqlsrv.php.