Class: Influxdb::Arel::Nodes::DeleteStatement

Inherits:
Node
  • Object
show all
Defined in:
lib/influxdb/arel/nodes/delete_statement.rb

Constant Summary

Constants inherited from Node

Node::ENTENSIONS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#extend, #to_sql

Methods included from Extensions::BooleanPredications

#and, #or

Constructor Details

#initializeDeleteStatement

Returns a new instance of DeleteStatement.



7
8
9
10
11
12
# File 'lib/influxdb/arel/nodes/delete_statement.rb', line 7

def initialize
  super
  self.wheres = []
  self.tables = []
  self.regexp = nil
end

Instance Attribute Details

#regexpObject

Returns the value of attribute regexp.



5
6
7
# File 'lib/influxdb/arel/nodes/delete_statement.rb', line 5

def regexp
  @regexp
end

#tablesObject

Returns the value of attribute tables.



5
6
7
# File 'lib/influxdb/arel/nodes/delete_statement.rb', line 5

def tables
  @tables
end

#wheresObject

Returns the value of attribute wheres.



5
6
7
# File 'lib/influxdb/arel/nodes/delete_statement.rb', line 5

def wheres
  @wheres
end

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


29
30
31
# File 'lib/influxdb/arel/nodes/delete_statement.rb', line 29

def eql?(other)
  self.class == other.class && wheres == other.wheres && table == other.table
end

#hashObject



25
26
27
# File 'lib/influxdb/arel/nodes/delete_statement.rb', line 25

def hash
  [wheres,  tables].hash
end

#initialize_copy(other) ⇒ Object



14
15
16
17
18
19
# File 'lib/influxdb/arel/nodes/delete_statement.rb', line 14

def initialize_copy(other)
  super
  self.wheres = wheres.map{|where| where.clone }
  self.tables = tables.map{|table| table.clone }
  self.regexp = regexp.clone
end

#tableObject



21
22
23
# File 'lib/influxdb/arel/nodes/delete_statement.rb', line 21

def table
  regexp || tables
end