Пример #1
0
 /**
  * Add a external sub-select to the query.
  *
  * @param  string   $column
  * @param  \Illuminate\Database\Query\Builder|static  $query
  * @param  string   $boolean
  * @param  bool     $not
  * @return $this
  */
 protected function whereInExistingQuery($column, $query, $boolean, $not)
 {
     $type = $not ? 'NotInSub' : 'InSub';
     $this->wheres[] = compact('type', 'column', 'query', 'boolean');
     $this->addBinding($query->getBindings(), 'where');
     return $this;
 }
Пример #2
0
 /**
  * Add another query builder as a nested where to the query builder.
  *
  * @param  \Illuminate\Database\Query\Builder|static $query
  * @param  string  $boolean
  * @return $this
  */
 public function addNestedWhereQuery($query, $boolean = 'and')
 {
     if (count($query->wheres)) {
         $type = 'Nested';
         $this->wheres[] = compact('type', 'query', 'boolean');
         $this->addBinding($query->getBindings(), 'where');
     }
     return $this;
 }