Метод | Описание | |
---|---|---|
__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 |
Метод | Описание | |
---|---|---|
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 | ||
Результат | TActiveRecordCriteria | criteria created from the method name and its arguments. |
public deleteByPk ( $keys ) : integer | ||
Результат | integer | number of rows affected. |
protected extractMatchingConditions ( $method, $condition ) : array | ||
Результат | array | search condition substrings |
public findAll ( |
||
$criteria | ||
Результат | TDbDataReader | record reader. |
public findAllByPk ( $keys ) : TDbDataReader | ||
Результат | TDbDataReader | record reader. |
public findAllBySql ( |
||
$criteria | ||
Результат | TDbDataReader | record reader. |
public findBySql ( |
||
$criteria | ||
Результат | TDbDataReader | record reader. |
protected getCompositeKeyCondition ( $values ) |
public getDbConnection ( ) : TDbConnection | ||
Результат | TDbConnection |
protected getFindCommand ( |
||
$criteria | ||
Результат | TDbCommand. |
public getLastInsertID ( ) : mixed | ||
Результат | mixed | last insert id, null if none is found. |
protected getPrimaryKeyCondition ( $values ) : array | ||
Результат | array | tuple($where, $parameters) |
protected getSqlCommand ( |
||
$criteria | ||
Результат | TDbCommand | command corresponding to the criteria. |
public onCreateCommand ( $command, $criteria ) |
public onExecuteCommand ( $command, $result ) |
protected quoteTuple ( $array ) : string | ||
Результат | string | quoted recursive tuple values, e.g. "('val1', 'val2')". |
public updateByPk ( $data, $keys ) : integer | ||
Результат | integer | number of records affected. |