Class: Influxdb::Arel::Nodes::SelectStatement
- Defined in:
- lib/influxdb/arel/nodes/select_statement.rb
Constant Summary
Constants inherited from Node
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#fill ⇒ Object
Returns the value of attribute fill.
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#into ⇒ Object
Returns the value of attribute into.
-
#join ⇒ Object
Returns the value of attribute join.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#merge ⇒ Object
Returns the value of attribute merge.
-
#order ⇒ Object
Returns the value of attribute order.
-
#regexp ⇒ Object
Returns the value of attribute regexp.
-
#tables ⇒ Object
Returns the value of attribute tables.
-
#wheres ⇒ Object
Returns the value of attribute wheres.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize ⇒ SelectStatement
constructor
A new instance of SelectStatement.
- #initialize_copy(other) ⇒ Object
- #table ⇒ Object
Methods inherited from Node
Methods included from Extensions::BooleanPredications
Constructor Details
#initialize ⇒ SelectStatement
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
#attributes ⇒ Object
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 5 def attributes @attributes end |
#fill ⇒ Object
Returns the value of attribute fill.
5 6 7 |
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 5 def fill @fill end |
#groups ⇒ Object
Returns the value of attribute groups.
5 6 7 |
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 5 def groups @groups end |
#into ⇒ Object
Returns the value of attribute into.
5 6 7 |
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 5 def into @into end |
#join ⇒ Object
Returns the value of attribute join.
5 6 7 |
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 5 def join @join end |
#limit ⇒ Object
Returns the value of attribute limit.
5 6 7 |
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 5 def limit @limit end |
#merge ⇒ Object
Returns the value of attribute merge.
5 6 7 |
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 5 def merge @merge end |
#order ⇒ Object
Returns the value of attribute order.
5 6 7 |
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 5 def order @order end |
#regexp ⇒ Object
Returns the value of attribute regexp.
5 6 7 |
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 5 def regexp @regexp end |
#tables ⇒ Object
Returns the value of attribute tables.
5 6 7 |
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 5 def tables @tables end |
#wheres ⇒ Object
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: ==
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 |
#hash ⇒ Object
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 |
#table ⇒ Object
37 38 39 |
# File 'lib/influxdb/arel/nodes/select_statement.rb', line 37 def table join || merge || regexp || tables.map(&:unalias).uniq end |