code: public function getLimitClause($offset, $length)
      {
          $hasLimit = $offset || $length;
          if ($offset && $length) {
              $clause = PHP_EOL . "LIMIT {$length}";
              if ($offset) {
                  $clause .= " OFFSET {$offset}";
              }
  
              return $clause;
          }
  
          if ($hasLimit && $length) {
              return PHP_EOL . "LIMIT {$length}";
          }
  
          return '';
      }
docs: {@inheritdoc}