class FilterLexer::Filter
A filter is the core object of the lexer: an indentifier, an relational operator and data
Public Instance Methods
data()
click to toggle source
The data element
Subclass of FilterLexer::Literal
# File lib/filter_lexer/nodes/filter.rb, line 21 def data return elements[2] end
identifier()
click to toggle source
The identifier element
Of type FilterLexer::Identifier
# File lib/filter_lexer/nodes/filter.rb, line 7 def identifier return elements[0] end
operator()
click to toggle source
The operator element
Subclass of FilterLexer::RelationalOperator
# File lib/filter_lexer/nodes/filter.rb, line 14 def operator return elements[1] end
query_string()
click to toggle source
# File lib/filter_lexer/formatters/sql.rb, line 27 def query_string return "#{identifier.sql} #{operator.sql} ?" end
query_variables()
click to toggle source
# File lib/filter_lexer/formatters/sql.rb, line 31 def query_variables return [data.data] end