summaryrefslogtreecommitdiff
path: root/framework/Data/DataGateway/TDataGatewayCommand.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/DataGateway/TDataGatewayCommand.php')
-rw-r--r--framework/Data/DataGateway/TDataGatewayCommand.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/framework/Data/DataGateway/TDataGatewayCommand.php b/framework/Data/DataGateway/TDataGatewayCommand.php
index 80856a0e..60db80d6 100644
--- a/framework/Data/DataGateway/TDataGatewayCommand.php
+++ b/framework/Data/DataGateway/TDataGatewayCommand.php
@@ -280,13 +280,24 @@ class TDataGatewayCommand extends TComponent
}
/**
- * Find one or more matching records for arbituary SQL.
+ * Find one matching records for arbituary SQL.
* @param TSqlCriteria $criteria
* @return TDbDataReader record reader.
*/
public function findBySql($criteria)
{
$command = $this->getSqlCommand($criteria);
+ return $this->onExecuteCommand($command, $command->queryRow());
+ }
+
+ /**
+ * Find zero or more matching records for arbituary SQL.
+ * @param TSqlCriteria $criteria
+ * @return TDbDataReader record reader.
+ */
+ public function findAllBySql($criteria)
+ {
+ $command = $this->getSqlCommand($criteria);
return $this->onExecuteCommand($command, $command->query());
}