PHP 클래스 Zend_Db_Adapter_Pdo_Abstract

상속: extends Zend_Db_Adapter_Abstract
파일 보기 프로젝트 열기: kimai/kimai 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_defaultStmtClass string Default class name for a DB statement.

공개 메소드들

메소드 설명
closeConnection ( ) : void Force the connection to close.
exec ( mixed $sql ) : integer Executes an SQL statement and return the number of affected rows
getServerVersion ( ) : string Retrieve server version in PHP style
isConnected ( ) : boolean Test if a connection is active
lastInsertId ( string $tableName = null, string $primaryKey = null ) : string Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column.
prepare ( string $sql ) : PDOStatement Prepares an SQL statement.
query ( string | Zend_Db_Select $sql, array $bind = [] ) : Zend_Db_Statement_Pdo Special handling for PDO query().
setFetchMode ( integer $mode ) : void Set the PDO fetch mode.
supportsParameters ( string $type ) : boolean Check if the adapter supports real SQL parameters.

보호된 메소드들

메소드 설명
_beginTransaction ( ) Begin a transaction.
_commit ( ) Commit a transaction.
_connect ( ) : void Creates a PDO object and connects to the database.
_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.

메소드 상세

_beginTransaction() 보호된 메소드

Begin a transaction.
protected _beginTransaction ( )

_commit() 보호된 메소드

Commit a transaction.
protected _commit ( )

_connect() 보호된 메소드

Creates a PDO object and connects to the database.
protected _connect ( ) : void
리턴 void

_dsn() 보호된 메소드

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

_quote() 보호된 메소드

Quote a raw string.
protected _quote ( string $value ) : string
$value string Raw string
리턴 string Quoted string

_rollBack() 보호된 메소드

Roll-back a transaction.
protected _rollBack ( )

closeConnection() 공개 메소드

Force the connection to close.
public closeConnection ( ) : void
리턴 void

exec() 공개 메소드

Executes an SQL statement and return the number of affected rows
public exec ( mixed $sql ) : integer
$sql mixed The SQL statement with placeholders. May be a string or Zend_Db_Select.
리턴 integer Number of rows that were modified or deleted by the SQL statement

getServerVersion() 공개 메소드

Retrieve server version in PHP style
public getServerVersion ( ) : string
리턴 string

isConnected() 공개 메소드

Test if a connection is active
public isConnected ( ) : boolean
리턴 boolean

lastInsertId() 공개 메소드

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. On RDBMS brands that don't support sequences, $tableName and $primaryKey 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.
리턴 string

prepare() 공개 메소드

Prepares an SQL statement.
public prepare ( string $sql ) : PDOStatement
$sql string The SQL statement with placeholders.
리턴 PDOStatement

query() 공개 메소드

All bind parameter names must begin with ':'
public query ( string | Zend_Db_Select $sql, array $bind = [] ) : Zend_Db_Statement_Pdo
$sql string | Zend_Db_Select The SQL statement with placeholders.
$bind array An array of data to bind to the placeholders.
리턴 Zend_Db_Statement_Pdo

setFetchMode() 공개 메소드

Set the PDO fetch mode.
public setFetchMode ( integer $mode ) : void
$mode integer A PDO fetch mode.
리턴 void

supportsParameters() 공개 메소드

Check if the adapter supports real SQL parameters.
public supportsParameters ( string $type ) : boolean
$type string 'positional' or 'named'
리턴 boolean

프로퍼티 상세

$_defaultStmtClass 보호되어 있는 프로퍼티

Default class name for a DB statement.
protected string $_defaultStmtClass
리턴 string