This method simulates a where condition. Use as follow:
        >>> yql.select('mytable').where(['name', '=', 'alain'], ['location', '!=', 'paris'])
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
711732
function filterWhere(q, filter) {
    if (typeof filter !== 'object' || filter.where === undefined)
      return;

    if (Object.keys(filter.where).length !== 0) {
      check(q, filter.where);
      q.where(filter.where);
    }
  }
834422
public Query<T> where(io.ebean.Expression expression) {
        return query().where(expression);
    }
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);
}
546428
def _select_query(self):
        
        if self._where:
            self._validate_select_where()
        return SelectStatement(
            self.column_family_name,
            fields=self._select_fields(),
            where=self._where,
            order_by=self._order,
            limit=self._limit,
            allow_filtering=self._allow_filtering
        )
1147594
function orwhere($where)
    {
        $args = func_get_args();
        if (count($args) == 1)
        {
            $where = $args[0];
        }
        else
        {
            list($field, $expr, $value) = $args;
            $where = '`'.str_replace('`', '', $field).'`' . $this->db->quote($expr) . " '".$this->db->quote($value)."'";
        }

        if ($this->where == "")
        {
            $this->where = "where " . $where;
        }
        else
        {
            $this->where = $this->where . " or " . $where;
        }
    }
243554
def query_property_filter(query, options)
      if options[:where]
        opts = options[:where]
        if opts[0].is_a?(Array)
          opts.each do |opt|
            query.where(opt[0], opt[1], opt[2]) unless opt.nil?
          end
        else
          query.where(opts[0], opts[1], opts[2])
        end
      end
      query
    end
1294969
def filter(self, criteria: Q, offset: int = 0, limit: int = 10,
               order_by: list = ()) -> ResultSet:
        
944239
def select(table, cols="*", where=(), group="", order=(), limit=(), **kwargs):
    """"""
    where = dict(where, **kwargs).items()
    sql, args = makeSQL("SELECT", table, cols, where, group, order, limit)
    return execute(sql, args)
1075027
def query_under_condition(condition, kind='2'):
        '''
        
        '''
        if DB_CFG['kind'] == 's':
            return TabPost.select().where(
                (TabPost.kind == kind) & (TabPost.valid == 1)
            ).order_by(
                TabPost.time_update.desc()
            )

        return TabPost.select().where(
            (TabPost.kind == kind) &
            (TabPost.valid == 1) &
            TabPost.extinfo.contains(condition)
        ).order_by(TabPost.time_update.desc())
939839
def _slice_where_conditions(self, wheres, offset, length):
        
        where_group = self.get_query().for_nested_where()
        where_group.wheres = wheres[offset : (offset + length)]

        return {"type": "nested", "query": where_group, "boolean": "and"}
1221779
def where(self, field, value = None, operator = None):
        
        if field is None:
            return self
        conjunction = None
        if value is None and isinstance(field, dict):
            for f,v in field.items():
                if self.where_criteria.size() > 0:
                    conjunction = 'AND'
                self.where_criteria.append(expressions.ConditionExpression(f, v, operator=operator, conjunction=conjunction))
                
        else:
            if self.where_criteria.size() > 0:
                    conjunction = 'AND'
            self.where_criteria.append(expressions.ConditionExpression(field, value, operator=operator, conjunction=conjunction))
        return self
607421
def filter(cls, start_position="", max_results="", qb=None, **kwargs):
        
        return cls.where(build_where_clause(**kwargs),
                         start_position=start_position, max_results=max_results, qb=qb)
1164793
def or_where(self, key, operator, value):
        
        if len(self._queries) > 0:
            self._current_query_index += 1
        self.__store_query({"key": key, "operator": operator, "value": value})
        return self
1287206
function checkSelectById () {
    // default to false
    this.isSelectById = false
    // id column must be in where clause
    if (!defined(this.args.where.id)) {
        return
    }
    // id must be string or array being selected with all results
    if (typeof this.args.where.id !== 'string' && !(Array.isArray(this.args.where.id) && (this.args.all || this.args.one))) {
        return
    }
    // query with order and join not supported
    if (defined(this.args.order) || defined(this.args.join)) {
        return
    }
    // false if there are custom revision flags
    if (this.args.allRevisions || this.args.current || this.args.isCurrent) {
        return
    }
    // get number of properties for where
    var whereProps = _.keys(this.args.where).length
    // false if there are more than 2 (id, isDeleted) where props
    if (whereProps > 2) {
        return
    }
    // if there are 2 where props other must be isDeleted
    else if (whereProps === 2 && !defined(this.args.where.isDeleted)) {
        return
    }
    // query is select by id
    this.isSelectById = true
}
166024
def select(self, to_select, where=None, sql_params=None):
        '''
        
        '''
        if sql_params is None:
            sql_params = []
        query = '''
        SELECT %s FROM %s
        ''' % (to_select, self._name)
        if where:
            query = '%s WHERE %s' % (query, where)
        return self._cursor.execute(query, tuple(sql_params))
1074791
def create_where():
    
    conjunction = Forward().setResultsName("conjunction")
    nested = Group(Suppress("(") + conjunction + Suppress(")")).setResultsName(
        "conjunction"
    )

    maybe_nested = nested | constraint
    inverted = Group(not_ + maybe_nested).setResultsName("not")
    full_constraint = maybe_nested | inverted
    conjunction <<= full_constraint + OneOrMore(and_or + full_constraint)
    return upkey("where") + Group(conjunction | full_constraint).setResultsName("where")