PHP Class Zend_Db_Adapter_Pdo_Mssql

Inheritance: extends Zend_Db_Adapter_Pdo_Abstract
Afficher le fichier Open project: kimai/kimai Class Usage Examples

Protected Properties

Свойство Type Description
$_numericDataTypes Values are: 0 = 32-bit integer 1 = 64-bit integer 2 = float or decimal
$_pdoType string PDO type.

Méthodes publiques

Méthode Description
describeTable ( string $tableName, string $schemaName = null ) : array Returns the column descriptions for a table.
getServerVersion ( ) : string Retrieve server version in PHP style Pdo_Mssql doesn't support getAttribute(PDO::ATTR_SERVER_VERSION)
lastInsertId ( string $tableName = null, string $primaryKey = null ) : string Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column.
limit ( string $sql, integer $count, integer $offset ) : string Adds an adapter-specific LIMIT clause to the SELECT statement.
listTables ( ) : array Returns a list of the tables in the database.

Méthodes protégées

Méthode Description
_beginTransaction ( ) Begin a transaction.
_commit ( ) Commit a transaction.
_connect ( ) : void
_dsn ( ) : string Creates a PDO DSN for the adapter from $this->_config settings.
_quote ( string $value ) : string Quote a raw string.
_rollBack ( ) Roll-back a transaction.

Method Details

_beginTransaction() protected méthode

It is necessary to override the abstract PDO transaction functions here, as the PDO driver for MSSQL does not support transactions.
protected _beginTransaction ( )

_commit() protected méthode

It is necessary to override the abstract PDO transaction functions here, as the PDO driver for MSSQL does not support transactions.
protected _commit ( )

_connect() protected méthode

protected _connect ( ) : void
Résultat void

_dsn() protected méthode

Creates a PDO DSN for the adapter from $this->_config settings.
protected _dsn ( ) : string
Résultat string

_quote() protected méthode

Quote a raw string.
protected _quote ( string $value ) : string
$value string Raw string
Résultat string Quoted string

_rollBack() protected méthode

It is necessary to override the abstract PDO transaction functions here, as the PDO driver for MSSQL does not support transactions.
protected _rollBack ( )

describeTable() public méthode

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 database or 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 PRIMARY_AUTO => integer; position of auto-generated column in primary key
public describeTable ( string $tableName, string $schemaName = null ) : array
$tableName string
$schemaName string OPTIONAL
Résultat array

getServerVersion() public méthode

Retrieve server version in PHP style Pdo_Mssql doesn't support getAttribute(PDO::ATTR_SERVER_VERSION)
public getServerVersion ( ) : string
Résultat string

lastInsertId() public méthode

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. Microsoft SQL Server does not support sequences, so the arguments to this method are ignored.
public lastInsertId ( string $tableName = null, string $primaryKey = null ) : string
$tableName string OPTIONAL Name of table.
$primaryKey string OPTIONAL Name of primary key column.
Résultat string

limit() public méthode

Adds an adapter-specific LIMIT clause to the SELECT statement.
public limit ( string $sql, integer $count, integer $offset ) : string
$sql string
$count integer
$offset integer OPTIONAL
Résultat string

listTables() public méthode

Returns a list of the tables in the database.
public listTables ( ) : array
Résultat array

Property Details

$_numericDataTypes protected_oe property

Values are: 0 = 32-bit integer 1 = 64-bit integer 2 = float or decimal
protected $_numericDataTypes

$_pdoType protected_oe property

PDO type.
protected string $_pdoType
Résultat string