/**
  * Create the SQL of a limit expression
  * @param zibo\library\database\manipulation\expression\LimitExpression $expression
  * @return string SQL of the limit expression
  */
 protected function parseLimitExpression(LimitExpression $expression)
 {
     $rowCount = $expression->getRowCount();
     $offset = $expression->getOffset();
     $sql = ' LIMIT ' . $rowCount;
     if ($offset != null) {
         $sql .= ' OFFSET ' . $offset;
     }
     return $sql;
 }
Пример #2
0
 /**
  * Get the number of rows of the limitation
  * @return int number of rows to fetch
  */
 public function getLimitCount()
 {
     return $this->limit->getRowCount();
 }