Méthode | Description | |
---|---|---|
__construct ( $builder ) | ||
count ( |
||
createCriteriaFromString ( $method, $condition, $args ) : TActiveRecordCriteria | ||
delete ( $criteria ) : integer | Executes a delete command. | |
deleteByPk ( $keys ) : integer | ||
find ( $criteria ) : array | Find one record matching the critera. | |
findAll ( |
Find one or more matching records. | |
findAllByIndex ( $criteria, $fields, $values ) | ||
findAllByPk ( $keys ) : TDbDataReader | ||
findAllBySql ( |
Find zero or more matching records for arbituary SQL. | |
findByPk ( $keys ) : array | ||
findBySql ( |
Find one matching records for arbituary SQL. | |
getBuilder ( ) : TDbCommandBuilder | ||
getDbConnection ( ) : TDbConnection | ||
getIndexKeyCondition ( $table, $fields, $values ) | ||
getLastInsertID ( ) : mixed | Iterate through all the columns and returns the last insert id of the first column that has a sequence or serial. | |
getTableInfo ( ) : TDbTableInfo | ||
insert ( $data ) : mixed | Inserts a new record into the table. Each array key must correspond to a column name in the table unless a null value is permitted. | |
onCreateCommand ( $command, $criteria ) | Raised when a command is prepared and parameter binding is completed. | |
onExecuteCommand ( $command, $result ) | Raised when a command is executed and the result from the database was returned. | |
update ( $data, $criteria ) : integer | Updates the table with new data. | |
updateByPk ( $data, $keys ) : integer |
Méthode | Description | |
---|---|---|
extractMatchingConditions ( $method, $condition ) : array | Calculates the AND/OR condition from dynamic method substrings using table meta data, allows for any AND-OR combinations. | |
getCompositeKeyCondition ( $values ) | Construct a "pk IN ('key1', 'key2', . | |
getFindCommand ( |
Build the find command from the criteria. Limit, Offset and Ordering are applied if applicable. | |
getPrimaryKeyCondition ( $values ) : array | Create the condition and parameters for find by primary. | |
getSqlCommand ( |
Build sql command from the criteria. Limit, Offset and Ordering are applied if applicable. | |
quoteTuple ( $array ) : string |
public createCriteriaFromString ( $method, $condition, $args ) : TActiveRecordCriteria | ||
Résultat | TActiveRecordCriteria | criteria created from the method name and its arguments. |
public deleteByPk ( $keys ) : integer | ||
Résultat | integer | number of rows affected. |
protected extractMatchingConditions ( $method, $condition ) : array | ||
Résultat | array | search condition substrings |
public findAll ( |
||
$criteria | ||
Résultat | TDbDataReader | record reader. |
public findAllByPk ( $keys ) : TDbDataReader | ||
Résultat | TDbDataReader | record reader. |
public findAllBySql ( |
||
$criteria | ||
Résultat | TDbDataReader | record reader. |
public findBySql ( |
||
$criteria | ||
Résultat | TDbDataReader | record reader. |
protected getCompositeKeyCondition ( $values ) |
protected getFindCommand ( |
||
$criteria | ||
Résultat | TDbCommand. |
public getLastInsertID ( ) : mixed | ||
Résultat | mixed | last insert id, null if none is found. |
protected getPrimaryKeyCondition ( $values ) : array | ||
Résultat | array | tuple($where, $parameters) |
protected getSqlCommand ( |
||
$criteria | ||
Résultat | TDbCommand | command corresponding to the criteria. |
public onCreateCommand ( $command, $criteria ) |
public onExecuteCommand ( $command, $result ) |
protected quoteTuple ( $array ) : string | ||
Résultat | string | quoted recursive tuple values, e.g. "('val1', 'val2')". |
public updateByPk ( $data, $keys ) : integer | ||
Résultat | integer | number of records affected. |