/**
  * 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 offset of the limitation
  * @return int offset
  */
 public function getLimitOffset()
 {
     return $this->limit->getOffset();
 }