TDataGatewayCommand is command builder and executor class for TTableGateway and TActiveRecordGateway.
TDataGatewayCommand builds the TDbCommand for TTableGateway and TActiveRecordGateway commands such as find(), update(), insert(), etc, using the TDbCommandBuilder classes (database specific TDbCommandBuilder classes are used).
Once the command is built and the query parameters are binded, the OnCreateCommand event is raised. Event handlers for the OnCreateCommand event should not alter the Command property nor the Criteria property of the TDataGatewayEventParameter.
TDataGatewayCommand excutes the TDbCommands and returns the result obtained from the database (returned value depends on the method executed). The OnExecuteCommand event is raised after the command is executed and resulting data is set in the TDataGatewayResultEventParameter object's Result property.
Located in /Data/DataGateway/TDataGatewayCommand.php (line 37)
TComponent | --TDataGatewayCommand
Executes a delete command.
Calculates the AND/OR condition from dynamic method substrings using table meta data, allows for any AND-OR combinations.
Find one record matching the critera.
Find zero or more matching records for arbituary SQL.
Construct a "pk IN ('key1', 'key2', ...)" criteria.
Build the find command from the criteria. Limit, Offset and Ordering are applied if applicable.
Iterate through all the columns and returns the last insert id of the first column that has a sequence or serial.
Create the condition and parameters for find by primary.
Build sql command from the criteria. Limit, Offset and Ordering are applied if applicable.
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.
Raised when a command is prepared and parameter binding is completed.
The parameter object is TDataGatewayEventParameter of which the TDataGatewayEventParameter::getCommand property can be inspected to obtain the sql query to be executed.
Raised when a command is executed and the result from the database was returned.
The parameter object is TDataGatewayResultEventParameter of which the TDataGatewayEventParameter::getResult property contains the data return from the database. The data returned can be changed by setting the TDataGatewayEventParameter::setResult property.
Updates the table with new data.
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Documentation generated on Mon, 21 Apr 2008 11:34:21 -0400 by phpDocumentor 1.3.0RC4