Ubiquity 2.5.2
php rapid development framework
|
Public Member Functions | |
getDSN () | |
getDbObject () | |
_connect () | |
query ($sql) | |
Executes an SQL statement, returning a result set as a statement object. | |
prepareAndExecute ($tableName, $condition, $fields, $parameters=null, $useCache=false, $one=false) | |
_optExecuteAndFetch ($statement, $tableName, $condition, $parameters=null, $useCache=false, $one=false) | |
_optExecuteAndFetchNoCache ($statement, $parameters=null, $one=false) | |
getDaoPreparedStatement ($tableName, $condition, $fields) | |
prepareAndExecuteNoCache ($tableName, $condition, $fields, $parameters=null) | |
storeCache () | |
prepareAndFetchAll ($sql, $parameters=null, $mode=null) | |
prepareAndFetchOne ($sql, $parameters=null, $mode=null) | |
prepareAndFetchAllColumn ($sql, $parameters=null, $column=null) | |
prepareAndFetchColumn ($sql, $parameters=null, $columnNumber=0) | |
getUpdateStatement ($sql) | |
prepareAndExecuteUpdate ($sql, $parameters=null) | |
Prepares a statement and execute a query for update (INSERT, UPDATE, DELETE...) | |
execute ($sql) | |
Execute an SQL statement and return the number of affected rows (INSERT, UPDATE or DELETE) | |
prepareStatement ($sql) | |
Prepares a statement for execution and returns a statement object. | |
prepareNamedStatement (string $name, string $sql) | |
Prepares and returns a statement for execution and gives it a name. | |
getNamedStatement (string $name, ?string $sql=null) | |
Returns the statement corresponding to the name. | |
bindValueFromStatement ($statement, $parameter, $value) | |
Sets $value to $parameter. | |
lastInserId ($name=null) | |
Returns the last insert id. | |
count ($tableName, $condition='') | |
Returns the number of records in $tableName matching with the condition passed as a parameter. | |
queryColumn ($query, $columnNumber=null) | |
fetchAll ($query, $mode=null) | |
isConnected () | |
ping () | |
Private Member Functions | |
getCacheValue ($tableName, $condition, $parameters, &$cKey) | |
getStatement ($sql) | |
Definition at line 20 of file DatabaseOperationsTrait.php.
_connect | ( | ) |
Definition at line 28 of file DatabaseOperationsTrait.php.
_optExecuteAndFetch | ( | $statement, | |
$tableName, | |||
$condition, | |||
$parameters = null , |
|||
$useCache = false , |
|||
$one = false |
|||
) |
Definition at line 82 of file DatabaseOperationsTrait.php.
_optExecuteAndFetchNoCache | ( | $statement, | |
$parameters = null , |
|||
$one = false |
|||
) |
Definition at line 96 of file DatabaseOperationsTrait.php.
bindValueFromStatement | ( | $statement, | |
$parameter, | |||
$value | |||
) |
Sets $value to $parameter.
mixed | $statement | |
string | $parameter | |
mixed | $value |
Definition at line 214 of file DatabaseOperationsTrait.php.
count | ( | $tableName, | |
$condition = '' |
|||
) |
Returns the number of records in $tableName matching with the condition passed as a parameter.
string | $tableName | |
string | $condition | Part following the WHERE of an SQL statement |
Definition at line 233 of file DatabaseOperationsTrait.php.
execute | ( | $sql | ) |
Execute an SQL statement and return the number of affected rows (INSERT, UPDATE or DELETE)
string | $sql |
Definition at line 170 of file DatabaseOperationsTrait.php.
fetchAll | ( | $query, | |
$mode = null |
|||
) |
Definition at line 244 of file DatabaseOperationsTrait.php.
|
private |
Definition at line 68 of file DatabaseOperationsTrait.php.
getDaoPreparedStatement | ( | $tableName, | |
$condition, | |||
$fields | |||
) |
Definition at line 100 of file DatabaseOperationsTrait.php.
getDbObject | ( | ) |
Definition at line 24 of file DatabaseOperationsTrait.php.
|
abstract |
Reimplemented in Database.
getNamedStatement | ( | string | $name, |
?string | $sql = null |
||
) |
Returns the statement corresponding to the name.
string | $name | |
?string | $sql |
Definition at line 202 of file DatabaseOperationsTrait.php.
|
private |
string | $sql |
Definition at line 140 of file DatabaseOperationsTrait.php.
getUpdateStatement | ( | $sql | ) |
string | $sql |
Definition at line 149 of file DatabaseOperationsTrait.php.
isConnected | ( | ) |
Definition at line 248 of file DatabaseOperationsTrait.php.
lastInserId | ( | $name = null | ) |
Returns the last insert id.
Definition at line 223 of file DatabaseOperationsTrait.php.
ping | ( | ) |
Definition at line 252 of file DatabaseOperationsTrait.php.
prepareAndExecute | ( | $tableName, | |
$condition, | |||
$fields, | |||
$parameters = null , |
|||
$useCache = false , |
|||
$one = false |
|||
) |
string | $tableName | |
string | $condition | |
array | string | $fields | |
array | $parameters | |
boolean | null | $useCache |
Definition at line 51 of file DatabaseOperationsTrait.php.
prepareAndExecuteNoCache | ( | $tableName, | |
$condition, | |||
$fields, | |||
$parameters = null |
|||
) |
Definition at line 105 of file DatabaseOperationsTrait.php.
prepareAndExecuteUpdate | ( | $sql, | |
$parameters = null |
|||
) |
Prepares a statement and execute a query for update (INSERT, UPDATE, DELETE...)
string | $sql | |
array | null | $parameters |
Definition at line 160 of file DatabaseOperationsTrait.php.
prepareAndFetchAll | ( | $sql, | |
$parameters = null , |
|||
$mode = null |
|||
) |
Definition at line 114 of file DatabaseOperationsTrait.php.
prepareAndFetchAllColumn | ( | $sql, | |
$parameters = null , |
|||
$column = null |
|||
) |
Definition at line 122 of file DatabaseOperationsTrait.php.
prepareAndFetchColumn | ( | $sql, | |
$parameters = null , |
|||
$columnNumber = 0 |
|||
) |
Definition at line 126 of file DatabaseOperationsTrait.php.
prepareAndFetchOne | ( | $sql, | |
$parameters = null , |
|||
$mode = null |
|||
) |
Definition at line 118 of file DatabaseOperationsTrait.php.
prepareNamedStatement | ( | string | $name, |
string | $sql | ||
) |
Prepares and returns a statement for execution and gives it a name.
string | $name | |
string | $sql |
Definition at line 191 of file DatabaseOperationsTrait.php.
prepareStatement | ( | $sql | ) |
Prepares a statement for execution and returns a statement object.
string | $sql |
Definition at line 180 of file DatabaseOperationsTrait.php.
query | ( | $sql | ) |
Executes an SQL statement, returning a result set as a statement object.
string | $sql |
Definition at line 38 of file DatabaseOperationsTrait.php.
queryColumn | ( | $query, | |
$columnNumber = null |
|||
) |
Definition at line 240 of file DatabaseOperationsTrait.php.
storeCache | ( | ) |
Definition at line 110 of file DatabaseOperationsTrait.php.