Class: Influxdb::Arel::DeleteManager
- Inherits:
-
TreeManager
- Object
- TreeManager
- Influxdb::Arel::DeleteManager
- Defined in:
- lib/influxdb/arel/delete_manager.rb
Constant Summary
Constants inherited from TreeManager
TreeManager::STRING_OR_SYMBOL_CLASS
Instance Attribute Summary
Attributes inherited from TreeManager
Instance Method Summary collapse
- #from(*new_tables, &block) ⇒ Object
-
#initialize ⇒ DeleteManager
constructor
A new instance of DeleteManager.
- #regexp=(value) ⇒ Object
- #tables=(value) ⇒ Object
Methods inherited from TreeManager
#initialize_copy, #to_sql, #visitor, #where, #where!, #where_values, #where_values=
Constructor Details
#initialize ⇒ DeleteManager
Returns a new instance of DeleteManager.
4 5 6 |
# File 'lib/influxdb/arel/delete_manager.rb', line 4 def initialize @ast = Nodes::DeleteStatement.new end |
Instance Method Details
#from(*new_tables, &block) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/influxdb/arel/delete_manager.rb', line 8 def from(*new_tables, &block) expr = Clauses::FromClause.new(*new_tables, &block).to_arel case expr when Array regexps, others = separate_tables(expr.to_a) ast.regexp = regexps.first if regexps ast.tables = others when Regexp ast.regexp = expr else ast.tables = Array(expr) end self end |
#regexp=(value) ⇒ Object
29 30 31 |
# File 'lib/influxdb/arel/delete_manager.rb', line 29 def regexp=(value) ast.regexp = value end |
#tables=(value) ⇒ Object
25 26 27 |
# File 'lib/influxdb/arel/delete_manager.rb', line 25 def tables=(value) ast.tables = value end |