where  - a function that accepts (record, rownum, rows) and returns boolean
330909
def filter(data, where):
    
    if len(data) == 0 or where == None or where == TRUE:
        return data

    if isinstance(data, Container):
        return data.filter(where)

    if is_container(data):
        temp = jx_expression_to_function(where)
        dd = wrap(data)
        return wrap([unwrap(d) for i, d in enumerate(data) if temp(wrap(d), i, dd)])
    else:
        Log.error(
            "Do not know how to handle type {{type}}", type=data.__class__.__name__
        )

    try:
        return drill_filter(where, data)
    except Exception as _:
        # WOW!  THIS IS INEFFICIENT!
        return wrap(
            [unwrap(d) for d in drill_filter(where, [DataObject(d) for d in data])]
        )
1189738
function whereBetween(column, values) {
    assert(Array.isArray(values), 'The second argument to whereBetween must be an array.');
    assert(values.length === 2, 'You must specify 2 values for the whereBetween clause');
    this._statements.push({
      grouping: 'where',
      type: 'whereBetween',
      column: column,
      value: values,
      not: this._not(),
      bool: this._bool()
    });
    return this;
  }
1258812
function whereHandler (obj) {
  let result = {}

  Object.keys(obj).forEach(k => {
    if (this.attributes.some(field => k.startsWith(field))) {
      _queryField2where.call(this, result, k, obj[k])
    }
    if (k === 'limit' || k === 'offset') {
      return
    }
    if (k.match(/\.\w+/)) {
      includeHandler.call(this, k, obj[k])
    }
  })

  return result
}
1132714
def _make_record(self,row):
        """"""
        res = dict(zip(['__id__']+[f for f in self.fields],row))
        for field_name in self.conv_func:
            res[field_name] = self.conv_func[field_name](res[field_name])
        return res
263487
def where(self, key, operator, value):
        
        self.__store_query({"key": key, "operator": operator, "value": value})
        return self
1197099
function findRecord(store, fieldName, text) {
      var index = store.find(fieldName, text);
      if (index === -1) {
        throw new Error('Text: ' + text + ' not found for fieldName: ' + fieldName);
      }
      return index;
    }
56073
def _where(self, filter_fn):
        '''  '''
        assert callable(filter_fn), 'filter_fn needs to be callable'
        return VList(i for i in self if filter_fn(i()))
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;
        }
    }
411337
def select(table, index_track, field_name, op, value, includeMissing):
    '''
    '''
    result = []
    result_index = []
    counter = 0
    for row in table:
        if detect_fields(field_name, convert_to_dict(row)):
            final_value = get_value(row, field_name)
            if do_op(final_value, op, value):
                result.append(row)
                result_index.append(index_track[counter])
        else:
            if includeMissing:
                result.append(row)
                result_index.append(index_track[counter])
        counter += 1
    #table = result
    #index_track = result_index
    return (result, result_index)
1247839
def where(self, predicate):
        
        if predicate is None:
            raise NullArgumentError(u"No predicate given for where clause")
        return Enumerable3(filter(predicate, self))
225417
def select_record(self, table, where=None, values=None, orderby=None, limit=None, columns=None):
        ''' '''
        query = self.schema.query_builder.build_select(table, where, orderby, limit, columns)
        return table.to_table(self.execute(query, values), columns=columns)
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
366472
def fetch_all_objects_from_db_where(self,
                                        cls: Type[T],
                                        table: str,
                                        fieldlist: Sequence[str],
                                        construct_with_pk: bool,
                                        wheredict: Optional[Dict[str, Any]],
                                        *args) -> List[T]:
        
        sql = (
            "SELECT " + ",".join([self.delimit(x) for x in fieldlist]) +
            " FROM " + self.delimit(table)
        )
        whereargs = []
        if wheredict is not None:
            sql += " WHERE " + " AND ".join([
                self.delimit(k) + "=?"
                for k in wheredict.keys()
            ])
            whereargs = wheredict.values()
        rows = self.fetchall(sql, *whereargs)
        objects = []
        for row in rows:
            objects.append(
                create_object_from_list(cls, fieldlist, row, *args,
                                        construct_with_pk=construct_with_pk))
        return objects
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
633952
def where(input, property, value)
      return input unless input.respond_to?(:select)
      input = input.values if input.is_a?(Hash)
      input.select do |object|
        Array(item_property(object, property)).map(&:to_s).include?(value.to_s)
      end || []
    end
316740
function where(expression) {

        //Check arguments
        if (!expression)
            throw new Error("Expression is invalid");

        //Define output array
        var outData = [];

        //For each element on data
        for (var i = 0; i < this.items.length; i++) {

            //Use function to obtain match
            var doesMatch = expression(this.items[i]);

            //If element match, append
            if (doesMatch)
                outData.push(this.items[i]);
        }

        //Return for chaining
        return new jslinq(outData);
    }
876265
def wherenotin(self, fieldname, value):
        
        return self.wherein(fieldname, value, negate=True)