Method | Description | |
---|---|---|
__construct ( |
Record gateway constructor. | |
countRecords ( |
Returns the number of records that match the given criteria. | |
delete ( |
Delete the record. | |
deleteRecordsByCriteria ( |
Delete multiple records by criteria. | |
deleteRecordsByPk ( |
Delete multiple records using primary keys. | |
findRecordByPK ( |
Returns record data matching the given primary key(s). If the table uses composite key, specify the name value pairs as an array. | |
findRecordBySql ( |
Return record data from sql query. | |
findRecordsByCriteria ( |
Returns record data matching the given critera. If $iterator is true, it will return multiple rows as TDbDataReader otherwise it returns the first row data. | |
findRecordsByIndex ( |
||
findRecordsByPks ( |
Returns records matching the list of given primary keys. | |
findRecordsBySql ( |
Return record data from sql query. | |
getCommand ( |
||
getRecordTableInfo ( |
Returns table information, trys the application cache first. | |
getTableInfo ( |
Returns table information for table in the database connection. | |
insert ( |
Insert a new record. | |
onCreateCommand ( $sender, $param ) | Raised when a command is prepared and parameter binding is completed. | |
onExecuteCommand ( $sender, $param ) | Raised when a command is executed and the result from the database was returned. | |
update ( |
Update the record. |
Method | Description | |
---|---|---|
getInsertValues ( |
||
getManager ( ) : |
||
getPrimaryKeyValues ( |
||
getRecordTableName ( |
Gets the table name from the 'TABLE' constant of the active record class if defined, otherwise use the class name as table name. | |
getUpdateValues ( |
||
raiseCommandEvent ( $event, $command, $record, $criteria ) | Raise the corresponding command event, insert, update, delete or select. | |
updateAssociatedRecords ( |
||
updatePostInsert ( $record ) | Sets the last insert ID to the corresponding property of the record if available. |
public __construct ( |
||
$manager |
public countRecords ( |
||
$record | ||
return | integer | number of records. |
public deleteRecordsByCriteria ( |
||
$record | ||
return | integer | number of records. |
public deleteRecordsByPk ( |
||
$record | ||
return | integer | number of rows deleted. |
public findRecordByPK ( |
||
$record | ||
return | array | record data |
public findRecordBySql ( |
||
$record | ||
return | array | result. |
public findRecordsByCriteria ( |
||
$record | ||
return | mixed | matching data. |
public findRecordsByIndex ( |
||
$record |
public findRecordsByPks ( |
||
$record | ||
return | array | matching data. |
public findRecordsBySql ( |
||
$record | ||
return | TDbDataReader | result iterator. |
public getCommand ( |
||
$record | ||
return |
protected getInsertValues ( |
||
$record | ||
return | array | insert values. |
protected getManager ( ) : |
||
return | record manager. |
protected getPrimaryKeyValues ( |
||
$record |
public getRecordTableInfo ( |
||
$record | ||
return | TDbTableInfo | table information. |
protected getRecordTableName ( |
||
$record | ||
return | string | table name for the given record class. |
public getTableInfo ( |
||
$connection | ||
return | TDbTableInfo | table details. |
protected getUpdateValues ( |
||
$record |
public onCreateCommand ( $sender, $param ) |
public onExecuteCommand ( $sender, $param ) |
protected raiseCommandEvent ( $event, $command, $record, $criteria ) |
protected updateAssociatedRecords ( |
||
$record |
protected updatePostInsert ( $record ) |