Exemple #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);
     }
 }
Exemple #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;
 }
Exemple #3
0
 public function toDialectString(Dialect $dialect)
 {
     $out = $dialect->fieldToString($this->field);
     return $this->cast ? $dialect->toCasted($out, $this->cast) : $out;
 }