예제 #1
0
 public function DoExecuteCustomSelectCommand($connection, $command)
 {
     $upLimit = $command->GetUpLimit();
     $limitCount = $command->GetLimitCount();
     if (isset($upLimit) && isset($limitCount)) {
         $sql = sprintf('SELECT * FROM (%s) a LIMIT %s OFFSET %s', $command->GetSQL(), $limitCount, $upLimit);
         $result = $this->GetConnectionFactory()->CreateDataset($connection, $sql);
         $result->Open();
         return $result;
     } else {
         return parent::DoExecuteSelectCommand($connection, $command);
     }
 }
예제 #2
0
 protected function DoExecuteSelectCommand($connection, $command)
 {
     $result = parent::DoExecuteSelectCommand($connection, $command);
     $this->ApplyCommandLimitsToDataset($command, $result);
     return $result;
 }
예제 #3
0
 protected function DoExecuteSelectCommand($connection, $command)
 {
     $upLimit = $command->GetUpLimit();
     $limitCount = $command->GetLimitCount();
     if (isset($upLimit) && isset($limitCount)) {
         $sql = sprintf('SELECT * FROM (SELECT RowNum as MAESTRO_ROWNUM, T.* FROM (%s) T) WHERE MAESTRO_ROWNUM BETWEEN %s AND %s', $command->GetSQL(), $upLimit + 1, $upLimit + $limitCount);
         $result = $this->GetConnectionFactory()->CreateDataset($connection, $sql);
         $result->Open();
         return $result;
     } else {
         return parent::DoExecuteSelectCommand($connection, $command);
     }
 }