Method: QueryHelper::Filter#initialize
- Defined in:
- lib/query_helper/filter.rb
#initialize(operator_code:, criterion:, comparate:, aggregate: false, qualify_clause: false) ⇒ Filter
Returns a new instance of Filter.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/query_helper/filter.rb', line 8 def initialize( operator_code:, criterion:, comparate:, aggregate: false, qualify_clause: false ) @operator_code = operator_code @criterion = criterion # Converts to a string to be inserted into sql. @comparate = comparate @aggregate = aggregate @qualify_clause = qualify_clause @bind_variable = ('a'..'z').to_a.shuffle[0,20].join.to_sym translate_operator_code() mofify_criterion() modify_comparate() validate_criterion() end |