add order by field.

@param   string  $column
@param   array   $params
498634
public function addByField($column, array $params)
    {
        $value = [];
        $value[] = sprintf('FIELD(%s,', $column);

        $sub = [];
        while ($param = array_shift($params)) {
            $sub[] = '?';
            $this->params[] = $param;
        }
        $value[] = join(', ', $sub) . ')';
        $this->set(join(' ', $value));
        return $this;
    }
1162248
private function newUpdateEntry($column, $param)
    {
        if (!empty($this->columnwhitelist)) {
            if (!in_array($column, $this->columnwhitelist)) {
                throw (new \Exception('Column in update list not found in white list'));
            }
        }
        $newupdate = new \stdClass();
        $newupdate->column = $column;
        $newupdate->param = $this->newBindEntry($param, ':up');
        $this->updates[] = $newupdate;
    }
978536
public function orderBy($column, $asc = true)
    {
        if ($asc) {
            $this->orders[] = $this->grammar->buildId($column) . ' ASC';
        } else {
            $this->orders[] = $this->grammar->buildId($column) . ' DESC';
        }

        return $this;
    }
493055
public function createOrder(Array $params)
    {
        $createOrderRequest = $this->getRequestParam('CreateOrderRequestParam', $params, $this->config, $this->sign);

        $formContent = $this->executeFormRequest($createOrderRequest);

        echo $formContent;
    }
1297858
final public function orderBy($column, $way = "DESC")
    {
        $column = $this->formatColumn($column);
        $this->_sql['order'][] = [$column, $way];
        return $this;
    }
1371258
public function addSort($column, $order = self::ASC)
    {
        //argument test
        Argument::i()
            //Argument 1 must be a string
            ->test(1, 'string')
            //Argument 2 must be a string
            ->test(2, 'string');
        
        if ($order != self::DESC) {
            $order = self::ASC;
        }
        
        $this->sort[$column] = $order;
        
        return $this;
    }
1141204
public function addColumn(TableColumn $column): void
  {
    // Add the column to our array of columns.
    $this->columns[$this->columnIndex] = $column;

    $column->onAddColumn($this, $this->columnIndex);

    // Increase the index for the next added column.
    $this->columnIndex += $column->getColSpan();
  }
667404
function orderBy($column, $dir = null) {
		if (null !== $dir && '' !== $dir) {
			$dir = strtoupper($dir);
			if ($dir !== self::ASC && $dir !== self::DESC) {
				throw new RuntimeException("$dir is not a valid sorting direction.");
			}
			$column .= ' ' . $dir;
		}
		$this->orders[] = trim($column);
		return $this;
	}
1270445
public function orderColumns(array $columns, $sql, $bindings = [])
    {
        foreach ($columns as $column) {
            $this->orderColumn($column, str_replace(':column', $column, $sql), $bindings);
        }

        return $this;
    }
464205
public function bindColumn($column, &$param, $type=null, $maxlen=null, $driver=null)
    {
        $column = is_numeric($column) ? $column : strtoupper($column);
        $this->_binds[$column] = &$param;
    }
1334261
public function orderBy($column, $order = Order::ASC)
    {
        $this->orders[] = [$column, $order];
        return $this;
    }
85491
public function setOrder($column, $order = self::ORDER_ASC): void
    {
        $this->orders = [];
        $this->addOrder($column, $order);
    }
615946
protected function setRelationSort($column)
    {
        list($relationName, $relationColumn) = explode('.', $column);

        if ($this->queries->contains(function ($query) use ($relationName) {
            return 'with' === $query['method'] && in_array($relationName, $query['arguments'], true);
        })) {
            $relation = $this->model->$relationName();

            $this->queries->push([
                'method' => 'join',
                'arguments' => $this->joinParameters($relation),
            ]);

            $this->resetOrderBy();

            $this->queries->push([
                'method' => 'orderBy',
                'arguments' => [
                    $relation->getRelated()->getTable().'.'.$relationColumn,
                    $this->sort['type'],
                ],
            ]);
        }
    }
869039
final protected function order_by($column, $order = 'ASC'){
        $order = 'DESC' === strtoupper($order) ? 'DESC' : 'ASC';
        $this->_order_by[] = sprintf('%s %s', $this->escape_column_name($column), $order);
        return $this;
    }
253279
public function buildWherePosition($column, array $values)
    {
        if (count($values) == 1 || is_null($values[1])) {
            $this->where($column, '>=', $values[0]);
        } else {
            $this->whereIn($column, range($values[0], $values[1]));
        }

        return $this;
    }
192150
public function andOrderBy($sql, $params=array())
    {
        $binder = new Binder();
        $this->_order[] = $binder->magicBind($sql, (array) $params);

        return $this;
    }
938745
public function columnRaw(string $sql, string ...$params)
    {
        $this->addColumn($this->dialect()->quote($sql), null, $params);

        return $this;
    }