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
#logic(is_hash = false) ⇒ Object
11
12
13
14
15
|
# File 'lib/sql_query_executor/operators/in.rb', line 11
def logic(is_hash=false)
initialize_attributes(true)
"[#{@value.join(', ')}].include?(#{field(is_hash)})"
end
|
#selector ⇒ Object
6
7
8
9
|
# File 'lib/sql_query_executor/operators/in.rb', line 6
def selector
initialize_attributes
{ @field => { "$in" => @value }}
end
|