PHP Класс Newscoop\Doctrine\AdoDbAdapter

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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