/** * @param AbstractBaseQuery $class * @param PlaceholderWriter $placeholderWriter * @param array $parts */ public static function writeLimitCondition(AbstractBaseQuery $class, PlaceholderWriter $placeholderWriter, array &$parts) { if (!is_null($class->getLimitStart())) { $start = $placeholderWriter->add($class->getLimitStart()); $parts[] = "LIMIT {$start}"; } }
/** * @param string $column * @param string $direction * @param null $table * * @return $this */ public function orderBy($column, $direction = OrderBy::ASC, $table = null) { $current = parent::orderBy($column, $direction, $table); if ($this->getParentQuery() != null) { $this->getParentQuery()->orderBy($column, $direction, \is_null($table) ? $this->getTable() : $table); } return $current; }
/** * @param \NilPortugues\Sql\QueryBuilder\Manipulation\AbstractBaseQuery * * @return \NilPortugues\Sql\QueryBuilder\Manipulation\AbstractBaseQuery */ protected function injectBuilder(AbstractBaseQuery $query) { return $query->setBuilder($this); }