Class: FilterLexer::Expression

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/filter_lexer/nodes/collections.rb,
lib/filter_lexer/formatters/sql.rb

Overview

The root element, expression is a collection of other expressions and and/or operators

Instance Method Summary collapse

Instance Method Details

#query_stringObject



7
8
9
# File 'lib/filter_lexer/formatters/sql.rb', line 7

def query_string
	return elements.map(&:query_string).join(' ')
end

#query_variablesObject



11
12
13
# File 'lib/filter_lexer/formatters/sql.rb', line 11

def query_variables
	return elements.map(&:query_variables).flatten
end

#to_queryObject



3
4
5
# File 'lib/filter_lexer/formatters/sql.rb', line 3

def to_query
	return "#{query_string} #{query_variables}"
end