Method: Cequel::Record::RecordSet#where
- Defined in:
- lib/cequel/record/record_set.rb
#where(column_name, value) ⇒ RecordSet #where(column_values) ⇒ RecordSet
Note:
Filtering on a primary key requires also filtering on all prior primary keys
Note:
Only one secondary index filter can be used in a given query
Note:
Secondary index filters cannot be mixed with primary key filters
Filter the record set to records containing a given value in an indexed column
204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/cequel/record/record_set.rb', line 204 def where(*args) if args.length == 1 column_filters = args.first.symbolize_keys elsif args.length == 2 warn "where(column_name, value) is deprecated. Use " \ "where(column_name => value) instead" column_filters = {args.first.to_sym => args.second} else fail ArgumentError, "wrong number of arguments (#{args.length} for 1..2)" end filter_columns(column_filters) end |