Adds a `where in` clause to the query.
965679
function whereIn(column, values) {
    if (Array.isArray(values) && isEmpty(values)) {
      return this.where(this._not());
    }
    this._statements.push({
      grouping: 'where',
      type: 'whereIn',
      column: column,
      value: values,
      not: this._not(),
      bool: this._bool()
    });
    return this;
  }
263487
def where(self, key, operator, value):
        
        self.__store_query({"key": key, "operator": operator, "value": value})
        return self
1029413
def filter(self, table, mappings, filter_string):
        """"""
        q = filter_string.lower()
        return [mapping for mapping in mappings
                if q in mapping.ud.lower()]
834422
public Query<T> where(io.ebean.Expression expression) {
        return query().where(expression);
    }
720774
def where(self, predicate):
        
        if predicate is None:
            raise NullArgumentError("No predicate given for where clause")
        return Enumerable(itertools.ifilter(predicate, self))
1164958
public void addWhere(final String _where)
        throws EFapsException
    {
        if (_where != null) {
            final List<AbstractWhere> wheres = InvokerUtil.analyzeWheres(_where);
            QWhereSection whereSection = null;
            for (final AbstractWhere where : wheres) {
                final AbstractQPart part = QueryBuilder.getQPart(where);
                if (whereSection == null) {
                    whereSection = new QWhereSection(part);
                } else {
                    whereSection.setPart(new QAnd(whereSection.getPart(), part));
                }
            }
            this.selectPart.setWhereSection(whereSection);
        }
    }
215636
def _nest_wheres_for_scope(self, query, where_counts):
        
        # Here, we totally remove all of the where clauses since we are going to
        # rebuild them as nested queries by slicing the groups of wheres into
        # their own sections. This is to prevent any confusing logic order.
        wheres = query.wheres

        query.wheres = []

        # We will take the first offset (typically 0) of where clauses and start
        # slicing out every scope's where clauses into their own nested where
        # groups for improved isolation of every scope's added constraints.
        previous_count = where_counts.pop(0)

        for where_count in where_counts:
            query.wheres.append(
                self._slice_where_conditions(
                    wheres, previous_count, where_count - previous_count
                )
            )

            previous_count = where_count
633476
public WhereCondition WHERE(WhereCondition whereCondition) {
        checkTokenOrderIsCorrect(ESqlToken.WHERE);
        mSgSQL.append("(");
        mSgSQL.append(whereCondition.toWhereConditionPart());
        mSgSQL.append(")");
        return WhereCondition.this;
    }
704974
private function addConditionsToSqlWhithWhereIn(): string
    {
        if (count($this->wheresIn) === 0) {
            throw new OrmException('Argument 2 passed to "whereIn()" can not be an empty array.');
        }
        
        $paramsWhereIn = " ( ";

        foreach ($this->wheresIn as $value) {                
            $paramsWhereIn .= " ?, ";

            $this->wheresBindValue[] = $value;
        }

        $this->wheresIn = [];

        return rtrim($paramsWhereIn, ', ')." ) ";
    }
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()}";
    }
348420
void addWhereClause(StringBuilder builder) {
        if (!getKunderaQuery().getFilterClauseQueue().isEmpty()) {
            builder.append(CQLTranslator.ADD_WHERE_CLAUSE);
        }
    }
1179692
def where_before_entry(query, ref):
    
    return orm.select(
        e for e in query
        if e.local_date < ref.local_date or
        (e.local_date == ref.local_date and e.id < ref.id)
    )
917039
private QueryBuilder populateInQuery(InExpression inExpression, EntityMetadata metadata)
    {
        String property = getField(inExpression.getExpression().toParsedText());
        Expression inItemsParameter = inExpression.getInItems();

        log.debug("IN query parameters for field " + property + " is: " + inItemsParameter);
        Iterable inItemsIterable = getInValuesCollection(inItemsParameter);

        return getFilter(kunderaQuery.new FilterClause(property, Expression.IN, inItemsIterable, property), metadata);
    }
112981
def build_where_part(self, wheres):
        
        where_parts = []

        # loop through each child of the Q condition
        for where in wheres.children:

            # if this child is another Q object, recursively build the where part
            if type(where) is Q:
                where_parts.append(self.build_where_part(where))
            elif type(where) is tuple:
                # build the condition for this where part
                # get the field name and value
                field_name = where[0]
                value = where[1]

                # set the default operator
                operator_str = 'eq'
                operator = '='

                # break apart the field name on double underscores
                field_parts = field_name.split('__')
                if len(field_parts) > 1:
                    # get the operator based on the last element split from the double underscores
                    operator_str = field_parts[-1]
                    operator = self.get_condition_operator(operator_str)
                    if operator is None:
                        operator = '='
                        field_name = '__'.join(field_parts)
                    else:
                        field_name = '__'.join(field_parts[:-1])

                # check if we are comparing to null
                if value is None:
                    # change the operator syntax to IS
                    operator = 'IS'

                # set up the condition string format
                condition = '{0} {1} ?'.format(field_name, operator)

                # apply the NOT if this condition is negated
                if wheres.negated:
                    condition = 'NOT({0})'.format(condition)

                # check if this value is multiple values
                if operator_str == 'in':

                    # make sure value is a list
                    if type(value) is not list:

                        # convert to string in case it is a number
                        value = str(value)

                        # split on commas
                        value = value.split(',')

                    # Ensure that we have a value in the list
                    if len(value) == 0:
                        value = [None]

                    if type(value) is Expression:
                        condition = condition.replace('?', value.str)
                    else:
                        # assign each query param to a named arg
                        named_args = []
                        for value_item in value:
                            named_arg = self.set_arg(value_item)
                            named_args.append('%({0})s'.format(named_arg))
                        # replace the ? in the query with the arg placeholder
                        condition = condition.replace('?', '({0})'.format(','.join(named_args)), 1)
                else:
                    # get the value based on the operator
                    value = self.get_condition_value(operator_str, value)

                    if type(value) is Expression:
                        condition = condition.replace('?', value.str)
                    else:
                        named_arg = self.set_arg(value)
                        # replace the ? in the query with the arg placeholder
                        condition = condition.replace('?', '%({0})s'.format(named_arg), 1)

                # add the condition to the where sql
                where_parts.append(condition)

        # join all where parts together
        joined_parts = ' {0} '.format(wheres.connector).join(where_parts)

        # wrap the where parts in parentheses
        return '({0})'.format(joined_parts)
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
1303170
function QueryWhere(data)
{
	//Initialize the string
	var sql = '';

	//Check the type
	if(typeof data === 'string')
	{
		//Return the where
		return data;
	}

	//Get all data
	for(var key in data)
	{
		//Save data value
		var value = data[key];

		//Check the data type
		if(typeof value === 'string' || value instanceof String)
		{
			//Add the quotes
			value = '"' + value + '"';
		}

		//Check if is necessary add the AND
		if(sql !== '')
		{
			//Add the AND
			sql = sql + ' AND ';
		}

		//Add the key=value
		sql = sql + key + '=' + value;
	}

	//Return the string
	return sql;
}
50323
private function bindWheres()
    {
        foreach ($this->wheres as $where) {
            $this->statement->bindValue(':' . $where['table'] . $where['column'], $where['value']);
        }
    }