Beispiel #1
0
 public function toDialectString(Dialect $dialect)
 {
     if ($this->field instanceof SelectQuery || $this->field instanceof LogicalObject) {
         return '(' . $dialect->fieldToString($this->field) . ')';
     } else {
         return parent::toDialectString($dialect);
     }
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 public function toDialectString(Dialect $dialect)
 {
     return parent::toDialectString($dialect) . ($this->alias ? ' AS ' . $dialect->quoteField($this->alias) : null);
 }