module AttrSearchableGrammar::Nodes::Base
Public Instance Methods
and(node)
click to toggle source
# File lib/attr_searchable_grammar/nodes.rb, line 7 def and(node) And.new self, node end
can_flatten?()
click to toggle source
# File lib/attr_searchable_grammar/nodes.rb, line 19 def can_flatten? false end
can_group?()
click to toggle source
# File lib/attr_searchable_grammar/nodes.rb, line 27 def can_group? false end
can_optimize?()
click to toggle source
# File lib/attr_searchable_grammar/nodes.rb, line 39 def can_optimize? can_flatten? || can_group? end
finalize!()
click to toggle source
# File lib/attr_searchable_grammar/nodes.rb, line 53 def finalize! self end
flatten!()
click to toggle source
# File lib/attr_searchable_grammar/nodes.rb, line 23 def flatten! self end
fulltext?()
click to toggle source
# File lib/attr_searchable_grammar/nodes.rb, line 35 def fulltext? false end
group!()
click to toggle source
# File lib/attr_searchable_grammar/nodes.rb, line 31 def group! self end
nodes()
click to toggle source
# File lib/attr_searchable_grammar/nodes.rb, line 57 def nodes [] end
not()
click to toggle source
# File lib/attr_searchable_grammar/nodes.rb, line 15 def not Not.new self end
optimize!()
click to toggle source
# File lib/attr_searchable_grammar/nodes.rb, line 43 def optimize! flatten!.group! while can_optimize? finalize! end
or(node)
click to toggle source
# File lib/attr_searchable_grammar/nodes.rb, line 11 def or(node) Or.new self, node end
to_sql(model)
click to toggle source
# File lib/attr_searchable_grammar/nodes.rb, line 49 def to_sql(model) model.connection.visitor.accept self end