'WHERE' only support 'AND'
189263
public function update($table, array $fields, array $where)
    {
        $fieldsKeys = array_keys($fields);
        $fieldsValues = array_values($fields);

        $whereKeys = array_keys($where);
        $whereValues = array_values($where);

        $replace = function ($key) { return $key . "=?"; };

        $set = implode(',', array_map($replace, $fieldsKeys));
        $where = implode(' AND ', array_map($replace, $whereKeys));

        $sql = "UPDATE {$table} SET {$set} WHERE {$where}";

        return $this->query($sql, array_merge($fieldsValues, $whereValues));
    }
1058799
def allowed?(to, from)
      to, from = JID.new(to), JID.new(from)
      return false                      if to.empty? || from.empty?
      return true                       if to.domain == from.domain # same domain always allowed
      return cross_domain?(to, from)    if local_jid?(to, from)     # both virtual hosted here
      return check_subdomains(to, from) if subdomain?(to, from)     # component/pubsub to component/pubsub
      return check_subdomain(to, from)  if subdomain?(to)           # to component/pubsub
      return check_subdomain(from, to)  if subdomain?(from)         # from component/pubsub
      return cross_domain?(to)          if local_jid?(to)           # from is remote
      return cross_domain?(from)        if local_jid?(from)         # to is remote
      return false
    end
1339836
function queryFilter(where) {
  if (where.$or) {
    return object =>
      _.reduce(where.$or, (result, subclause) => result ||
        queryFilter(subclause)(object), false);
  }

  // Go through each key in where clause
  return object => _.reduce(where, (result, whereParams, key) => {
    const match = evaluateObject(object, whereParams, key);
    return result && match;
  }, true);
}
729385
def has_roles?(*args)
      throw Exception.new("Must supply at least one role.") if args.empty?
      roles.where(name: args).count == args.count
    end
931315
public final void mWHERE() throws RecognitionException {
		try {
			int _type = WHERE;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:71:7: ( 'where' )
			// hql.g:71:9: 'where'
			{
			match("where"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
1169970
def where(self, params):
        
        self.params = dict(self.params, **params)   # params overrides self.params
        return self
434172
def where(self, *args):
        ''' 
        '''
        if not self._table:
            raise errors.NoTableSelectedError('No Table Selected')

        clause = []
        self._query += ' WHERE '

        clause = [ self._clause_formatter(x) for x in args if x ]

        self._query += ' AND '.join(clause)

        payload = self._payload_builder(self._query)
        response = self.execute_query(payload)

        return response
733633
protected function compileWheres()
    {
        // The wheres to compile.
        $wheres = $this->wheres ?: [];

        // We will add all compiled wheres to this array.
        $compiled = [];

        foreach ($wheres as $i => &$where) {
            // Make sure the operator is in lowercase.
            if (isset($where['operator'])) {
                $where['operator'] = strtolower($where['operator']);

                if (array_key_exists($where['operator'], $this->operators)) {
                    $where['operator'] = $this->operators[$where['operator']];
                }
            }

            // Convert id's.
            if (isset($where['column']) && ($where['column'] == '_id' || Str::endsWith($where['column'], '._id'))) {
                // Multiple values.
                if (isset($where['values'])) {
                    foreach ($where['values'] as &$value) {
                        $value = $this->convertKey($value);
                    }
                } // Single value.
                elseif (isset($where['value'])) {
                    $where['value'] = $this->convertKey($where['value']);
                }
            }

            // Convert DateTime values to UTCDateTime.
            if (isset($where['value'])) {
                if (is_array($where['value'])) {
                    array_walk_recursive($where['value'], function (&$item, $key) {
                        if ($item instanceof DateTime) {
                            $item = new UTCDateTime($item->getTimestamp() * 1000);
                        }
                    });
                } else {
                    if ($where['value'] instanceof DateTime) {
                        $where['value'] = new UTCDateTime($where['value']->getTimestamp() * 1000);
                    }
                }
            } elseif (isset($where['values'])) {
                array_walk_recursive($where['values'], function (&$item, $key) {
                    if ($item instanceof DateTime) {
                        $item = new UTCDateTime($item->getTimestamp() * 1000);
                    }
                });
            }

            // The next item in a "chain" of wheres devices the boolean of the
            // first item. So if we see that there are multiple wheres, we will
            // use the operator of the next where.
            if ($i == 0 && count($wheres) > 1 && $where['boolean'] == 'and') {
                $where['boolean'] = $wheres[$i + 1]['boolean'];
            }

            // We use different methods to compile different wheres.
            $method = "compileWhere{$where['type']}";
            $result = $this->{$method}($where);

            // Wrap the where with an $or operator.
            if ($where['boolean'] == 'or') {
                $result = ['$or' => [$result]];
            }

            // If there are multiple wheres, we will wrap it with $and. This is needed
            // to make nested wheres work.
            elseif (count($wheres) > 1) {
                $result = ['$and' => [$result]];
            }

            // Merge the compiled where with the others.
            $compiled = array_merge_recursive($compiled, $result);
        }

        return $compiled;
    }
752068
def add_where_clause(self, clause):
        
        if not isinstance(clause, WhereClause):
            raise StatementException("only instances of WhereClause can be added to statements")
        clause.set_context_id(self.context_counter)
        self.context_counter += clause.get_context_size()
        self.where_clauses.append(clause)
887422
private void setWhere(Where where) throws SqlParseException {
		if (where != null) {
			QueryBuilder whereQuery = QueryMaker.explan(where);
			request.filter(whereQuery);
		} else {
			request.filter(QueryBuilders.matchAllQuery());
		}
	}
1288412
function where($left, $operator = Query::EQUAL, $right = null, $quote = null) {
		if (func_num_args() === 1) {
			return $this->addAnd($left);
		}
		return $this->addAnd($left, $right, $operator, $quote);
	}
167594
def where_exists(self, query, boolean="and", negate=False):
        
        if isinstance(query, Builder):
            query = query.get_query()

        self.get_query().where_exists(query, boolean, negate)

        return self
938837
def findWhere(self, attrs=None):
        
        return self._wrap(self._clean.where(attrs, True))
1326324
def supported_operations(self):
        
        return tuple(op for op in backend.DIR_OPS if self._dir_ops & op)
868658
protected function buildWheres()
    {
        if (count($this->where) === 0) {
            return '';
        }

        // Use a ConditionSet to build the wheres
        $conditionSet = new Query\Condition\AndSet($this, $this->where);
        return "WHERE {$conditionSet->buildWithoutParentheses()}";
    }
902017
def _validate_select_where(self):
        
        #check that there's either a = or IN relationship with a primary key or indexed field
        equal_ops = [self.model._columns.get(w.field) for w in self._where if isinstance(w.operator, EqualsOperator)]
        token_comparison = any([w for w in self._where if isinstance(w.value, Token)])
        if not any([w.primary_key or w.index for w in equal_ops]) and not token_comparison and not self._allow_filtering:
            raise QueryException('Where clauses require either a "=" or "IN" comparison with either a primary key or indexed field')

        if not self._allow_filtering:
            #if the query is not on an indexed field
            if not any([w.index for w in equal_ops]):
                if not any([w.partition_key for w in equal_ops]) and not token_comparison:
                    raise QueryException('Filtering on a clustering key without a partition key is not allowed unless allow_filtering() is called on the querset')
483863
def where_stmt_handle(tokens):
    """"""
    internal_assert(len(tokens) == 2, "invalid where statement tokens", tokens)
    base_stmt, assignment_stmts = tokens
    stmts = list(assignment_stmts) + [base_stmt]
    return "\n".join(stmts) + "\n"