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); } }
protected function DoExecuteSelectCommand($connection, $command) { $result = parent::DoExecuteSelectCommand($connection, $command); $this->ApplyCommandLimitsToDataset($command, $result); return $result; }
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); } }