Class: Influxdb::Arel::Nodes::SelectStatement

Inherits:
Node
  • Object
show all
Defined in:
lib/influxdb/arel/nodes/select_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

#initializeSelectStatement

Returns a new instance of SelectStatement.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 7

def initialize
  super
  self.wheres = []
  self.groups = []
  self.attributes = []
  self.tables = []
  self.regexp = nil
  self.merge = nil
  self.join = nil
  self.order = nil
  self.limit = nil
  self.fill = nil
  self.into = nil
end

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



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

def attributes
  @attributes
end

#fillObject

Returns the value of attribute fill.



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

def fill
  @fill
end

#groupsObject

Returns the value of attribute groups.



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

def groups
  @groups
end

#intoObject

Returns the value of attribute into.



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

def into
  @into
end

#joinObject

Returns the value of attribute join.



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

def join
  @join
end

#limitObject

Returns the value of attribute limit.



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

def limit
  @limit
end

#mergeObject

Returns the value of attribute merge.



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

def merge
  @merge
end

#orderObject

Returns the value of attribute order.



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

def order
  @order
end

#regexpObject

Returns the value of attribute regexp.



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

def regexp
  @regexp
end

#tablesObject

Returns the value of attribute tables.



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

def tables
  @tables
end

#wheresObject

Returns the value of attribute wheres.



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

def wheres
  @wheres
end

Instance Method Details

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

Returns:

  • (Boolean)


45
46
47
48
49
50
51
52
53
54
55
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 45

def eql?(other)
  self.class == other.class &&
    attributes == other.attributes &&
    wheres == other.wheres &&
    groups == other.groups &&
    table == other.table &&
    order == other.order &&
    limit == other.limit &&
    fill == other.fill &&
    into == other.into
end

#hashObject



41
42
43
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 41

def hash
  [limit, order, wheres, groups, attributes, table, fill, into].hash
end

#initialize_copy(other) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 22

def initialize_copy(other)
  super
  self.wheres = wheres.map{|where| where.clone }
  self.groups = groups.map{|group| group.clone }
  self.attributes = attributes.map{|attribute| attribute.clone }
  self.tables = tables.map{|table| table.clone }
  self.join = join.clone if join
  self.merge = merge.clone if merge
  self.regexp = regexp.clone if regexp
  self.order = order.clone if order
  self.limit = limit.clone if limit
  self.fill = fill.clone if fill
  self.into = into.clone if into
end

#tableObject



37
38
39
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 37

def table
  join || merge || regexp || tables.map(&:unalias).uniq
end