PHP Class Newscoop\Doctrine\AdoDbAdapter

Afficher le fichier Open project: sourcefabric/newscoop

Protected Properties

Свойство Type Description
$affectedRows integer
$connection Doctrine\DBAL\Connection
$statement Newscoop\Doctrine\AdoDbStatement

Méthodes publiques

Méthode Description
__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

Method Details

__construct() public méthode

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

affected_rows() public méthode

Get affected rows count
public affected_rows ( ) : integer
Résultat integer

createDatabase() public méthode

Create a new database
public createDatabase ( string $database ) : void
$database string
Résultat void

errorMsg() public méthode

Fetch extended error information associated with the last database operation.
public errorMsg ( ) : string
Résultat string

escape() public méthode

Escape value
public escape ( mixed $value ) : string
$value mixed
Résultat string

escapeIdentifier() public méthode

Escape identifier
public escapeIdentifier ( string $identifier ) : string
$identifier string
Résultat string

escapeKeyVal() public méthode

Escape column equals value statement
public escapeKeyVal ( string $key, string $val ) : string
$key string
$val string
Résultat string

escapeOperation() public méthode

Escape comparison operation
public escapeOperation ( array $operation ) : string
$operation array
Résultat string

execute() public méthode

Execute sql statement
public execute ( string $sql, $params = [] ) : null
$sql string
Résultat null

executeUpdate() public méthode

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

getAll() public méthode

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

getCol() public méthode

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

getDriverName() public méthode

Get driver name
public getDriverName ( ) : string
Résultat string

getOne() public méthode

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
Résultat mixed

getRow() public méthode

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
Résultat array

hasDatabase() public méthode

Test if there is a database with given name
public hasDatabase ( string $database ) : boolean
$database string
Résultat boolean

hasTable() public méthode

Test if there is a table with given name
public hasTable ( string $table ) : boolean
$table string
Résultat boolean

insert_id() public méthode

Get last insert id
public insert_id ( ) : integer
Résultat integer

isConnected() public méthode

Test if is connected
public isConnected ( boolean $forceConnection = false ) : boolean
$forceConnection boolean
Résultat boolean

selectLimit() public méthode

Performs select with given limit and offset params
public selectLimit ( string $sql, integer $limit, integer $offset ) : mixed
$sql string
$limit integer
$offset integer
Résultat mixed

Property Details

$affectedRows protected_oe property

protected int $affectedRows
Résultat integer

$connection protected_oe property

protected Connection,Doctrine\DBAL $connection
Résultat Doctrine\DBAL\Connection

$statement protected_oe property

protected Newscoop\Doctrine\AdoDbStatement $statement
Résultat Newscoop\Doctrine\AdoDbStatement