Class: Influxdb::Arel::TreeManager
- Inherits:
-
Object
- Object
- Influxdb::Arel::TreeManager
- Defined in:
- lib/influxdb/arel/tree_manager.rb
Direct Known Subclasses
Constant Summary collapse
- STRING_OR_SYMBOL_CLASS =
[Symbol, String]
Instance Attribute Summary collapse
-
#ast ⇒ Object
readonly
Returns the value of attribute ast.
Instance Method Summary collapse
Instance Attribute Details
#ast ⇒ Object (readonly)
Returns the value of attribute ast.
6 7 8 |
# File 'lib/influxdb/arel/tree_manager.rb', line 6 def ast @ast end |
Instance Method Details
#initialize_copy(other) ⇒ Object
16 17 18 19 |
# File 'lib/influxdb/arel/tree_manager.rb', line 16 def initialize_copy(other) super @ast = @ast.clone end |
#to_sql ⇒ Object
12 13 14 |
# File 'lib/influxdb/arel/tree_manager.rb', line 12 def to_sql visitor.accept(ast) end |
#visitor ⇒ Object
8 9 10 |
# File 'lib/influxdb/arel/tree_manager.rb', line 8 def visitor Visitor.new end |
#where(expr) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/influxdb/arel/tree_manager.rb', line 21 def where(expr) expr = expr.ast if TreeManager === expr expr = Arel.sql(expr) if String === expr ast.wheres << expr self end |