PHP 클래스 Newscoop\Doctrine\AdoDbAdapter

파일 보기 프로젝트 열기: sourcefabric/newscoop

보호된 프로퍼티들

프로퍼티 타입 설명
$affectedRows integer
$connection Doctrine\DBAL\Connection
$statement Newscoop\Doctrine\AdoDbStatement

공개 메소드들

메소드 설명
__construct ( Doctrine\DBAL\Connection $connection )
affected_rows ( ) : integer Get affected rows count
createDatabase ( string $database ) : void Create a new database
errorMsg ( ) : string Fetch extended error information associated with the last database operation.
escape ( mixed $value ) : string Escape value
escapeIdentifier ( string $identifier ) : string Escape identifier
escapeKeyVal ( string $key, string $val ) : string Escape column equals value statement
escapeOperation ( array $operation ) : string Escape comparison operation
execute ( string $sql, $params = [] ) : null Execute sql statement
executeUpdate ( string $sql ) : integer Execute INSERT/UPDATE/DELETE statement and return number of affected rows
getAll ( string $sql, array $params = [] ) : array Execute sql query and return the result as an array
getCol ( string $sql, array $params = [] ) : array Execute sql query and returns all elements of the first column.
getDriverName ( ) : string Get driver name
getOne ( string $sql, array $params = [] ) : mixed Execute sql query and returns the value of first column of the first row.
getRow ( string $sql, array $params = [] ) : array Execute sql query and return first row of the result as an associative array.
hasDatabase ( string $database ) : boolean Test if there is a database with given name
hasTable ( string $table ) : boolean Test if there is a table with given name
insert_id ( ) : integer Get last insert id
isConnected ( boolean $forceConnection = false ) : boolean Test if is connected
selectLimit ( string $sql, integer $limit, integer $offset ) : mixed Performs select with given limit and offset params

메소드 상세

__construct() 공개 메소드

public __construct ( Doctrine\DBAL\Connection $connection )
$connection Doctrine\DBAL\Connection

affected_rows() 공개 메소드

Get affected rows count
public affected_rows ( ) : integer
리턴 integer

createDatabase() 공개 메소드

Create a new database
public createDatabase ( string $database ) : void
$database string
리턴 void

errorMsg() 공개 메소드

Fetch extended error information associated with the last database operation.
public errorMsg ( ) : string
리턴 string

escape() 공개 메소드

Escape value
public escape ( mixed $value ) : string
$value mixed
리턴 string

escapeIdentifier() 공개 메소드

Escape identifier
public escapeIdentifier ( string $identifier ) : string
$identifier string
리턴 string

escapeKeyVal() 공개 메소드

Escape column equals value statement
public escapeKeyVal ( string $key, string $val ) : string
$key string
$val string
리턴 string

escapeOperation() 공개 메소드

Escape comparison operation
public escapeOperation ( array $operation ) : string
$operation array
리턴 string

execute() 공개 메소드

Execute sql statement
public execute ( string $sql, $params = [] ) : null
$sql string
리턴 null

executeUpdate() 공개 메소드

Execute INSERT/UPDATE/DELETE statement and return number of affected rows
public executeUpdate ( string $sql ) : integer
$sql string
리턴 integer

getAll() 공개 메소드

Execute sql query and return the result as an array
public getAll ( string $sql, array $params = [] ) : array
$sql string
$params array
리턴 array

getCol() 공개 메소드

Execute sql query and returns all elements of the first column.
public getCol ( string $sql, array $params = [] ) : array
$sql string
$params array
리턴 array

getDriverName() 공개 메소드

Get driver name
public getDriverName ( ) : string
리턴 string

getOne() 공개 메소드

Execute sql query and returns the value of first column of the first row.
public getOne ( string $sql, array $params = [] ) : mixed
$sql string
$params array
리턴 mixed

getRow() 공개 메소드

Execute sql query and return first row of the result as an associative array.
public getRow ( string $sql, array $params = [] ) : array
$sql string
$params array
리턴 array

hasDatabase() 공개 메소드

Test if there is a database with given name
public hasDatabase ( string $database ) : boolean
$database string
리턴 boolean

hasTable() 공개 메소드

Test if there is a table with given name
public hasTable ( string $table ) : boolean
$table string
리턴 boolean

insert_id() 공개 메소드

Get last insert id
public insert_id ( ) : integer
리턴 integer

isConnected() 공개 메소드

Test if is connected
public isConnected ( boolean $forceConnection = false ) : boolean
$forceConnection boolean
리턴 boolean

selectLimit() 공개 메소드

Performs select with given limit and offset params
public selectLimit ( string $sql, integer $limit, integer $offset ) : mixed
$sql string
$limit integer
$offset integer
리턴 mixed

프로퍼티 상세

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

protected int $affectedRows
리턴 integer

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

protected Connection,Doctrine\DBAL $connection
리턴 Doctrine\DBAL\Connection

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

protected Newscoop\Doctrine\AdoDbStatement $statement
리턴 Newscoop\Doctrine\AdoDbStatement