예제 #1
0
 /**
  * Add an order by expression to the query.
  *
  * @param string      $column    Column Name.
  * @param string|null $orderMode Order mode, whether desc or asc.
  *
  * @return $this The same instance to concatenate methods.
  */
 public function orderBy($column, $orderMode = null)
 {
     $columnObj = $this->factory->references('Column', $column);
     $orderModeObj = $orderMode ? $this->factory->references('OrderModeEnum', $orderMode) : null;
     $this->select->orderBy($columnObj, $orderModeObj);
     return $this;
 }
예제 #2
0
 /**
  * Add an order by expression to the query.
  *
  * @param string      $column    Column Name.
  * @param string|null $orderMode Order mode, whether desc or asc.
  *
  * @return $this The same instance to concatenate methods.
  */
 public function orderBy($column, $orderMode = null)
 {
     /** @var ColumnInterface $columnObj */
     $columnObj = $this->factory->references('Column', $column);
     /** @var OrderModeEnumInterface $orderModeObj */
     $orderModeObj = $orderMode ? $this->factory->references('OrderModeEnum', $orderMode) : null;
     $this->update->orderBy($columnObj, $orderModeObj);
     return $this;
 }