public function toDialectString(Dialect $dialect) { if ($this->field instanceof SelectQuery || $this->field instanceof LogicalObject) { return '(' . $dialect->fieldToString($this->field) . ')'; } else { return parent::toDialectString($dialect); } }
public function toDialectString(Dialect $dialect) { if ($this->field instanceof SelectQuery || $this->field instanceof LogicalObject) { $result = '(' . $dialect->fieldToString($this->field) . ')'; } else { $result = parent::toDialectString($dialect); } $result .= $this->direction->decide(' ASC', ' DESC') . $this->nulls->decide(' NULLS FIRST', ' NULLS LAST'); return $result; }
public function toDialectString(Dialect $dialect) { $out = $dialect->fieldToString($this->field); return $this->cast ? $dialect->toCasted($out, $this->cast) : $out; }