$limitTemplateQuery = 'SELECT * FROM (SELECT INNER_QUERY.*, ROWNUM RNUM FROM (%s) INNER_QUERY WHERE ROWNUM < %d)' .
($offset ? ' WHERE RNUM >= %d' : ''
);
return sprintf($limitTemplateQuery,
$sql,
$offset +
$this->QBLimit + 1,
$offset);
} /**
* Resets the query builder values. Called by the get() function
*/
protected function resetSelect() { $this->limitUsed = false;
parent::
resetSelect();
} /**
* Generates a platform-specific batch update string from the supplied data
*/
protected function _updateBatch(string
$table, array
$keys, array
$values): string
{ $sql =
$this->QBOptions
['sql'
] ?? '';
// if this is the first iteration of batch then we need to build skeleton sql
if ($sql === ''
) {