Class: SqlQueryExecutor::Operators::In
- Inherits:
-
Base
- Object
- Base
- SqlQueryExecutor::Operators::In
show all
- Defined in:
- lib/sql_query_executor/operators/in.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#execute! ⇒ Object
6
7
8
9
10
11
12
|
# File 'lib/sql_query_executor/operators/in.rb', line 6
def execute!
result = @collection.select do |record|
value = record.send(@field)
@value.send('include?', value)
end
end
|
#selector ⇒ Object
14
15
16
|
# File 'lib/sql_query_executor/operators/in.rb', line 14
def selector
{ @field => { "$in" => @value }}
end
|