Class: Influxdb::Arel::Nodes::Node

Inherits:
Object
  • Object
show all
Includes:
Extensions::BooleanPredications
Defined in:
lib/influxdb/arel/nodes/node.rb

Direct Known Subclasses

And, Binary, DeleteStatement, Function, Now, SelectStatement, Unary

Constant Summary collapse

ENTENSIONS =
{
  alias: :AliasPrediction,
  table_alias: :TableAliasPrediction,
  math: :Math,
  expressions: :Expressions,
  predications: :Predications
}

Instance Method Summary collapse

Methods included from Extensions::BooleanPredications

#and, #or

Instance Method Details

#extend(*extensions) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/influxdb/arel/nodes/node.rb', line 19

def extend(*extensions)
  extensions.each do |extension|
    if module_name = EXTENSIONS[extension]
      singleton_class.send(:include, Influxdb::Arel::Extensions.const_get(module_name))
    end
  end

  self
end

#to_sqlObject



15
16
17
# File 'lib/influxdb/arel/nodes/node.rb', line 15

def to_sql
  Visitor.new.accept(self)
end