Prado\Data\DataGateway\TDataGatewayCommand::delete PHP Method

delete() public method

Executes a delete command.
public delete ( $criteria ) : integer
return integer number of records affected.
    public function delete($criteria)
    {
        $where = $criteria->getCondition();
        $parameters = $criteria->getParameters()->toArray();
        $command = $this->getBuilder()->createDeleteCommand($where, $parameters);
        $this->onCreateCommand($command, $criteria);
        $command->prepare();
        return $command->execute();
    }