class Arel::Nodes::Window
Attributes
Public Class Methods
Source
# File lib/arel/nodes/window.rb, line 7 def initialize @orders = [] @partitions = [] @framing = nil end
Public Instance Methods
Source
# File lib/arel/nodes/window.rb, line 58 def eql? other self.class == other.class && self.orders == other.orders && self.framing == other.framing && self.partitions == other.partitions end
Also aliased as: ==
Source
# File lib/arel/nodes/window.rb, line 49 def initialize_copy other super @orders = @orders.map { |x| x.clone } end
Calls superclass method
Source
# File lib/arel/nodes/window.rb, line 13 def order *expr # FIXME: We SHOULD NOT be converting these to SqlLiteral automatically @orders.concat expr.map { |x| String === x || Symbol === x ? Nodes::SqlLiteral.new(x.to_s) : x } self end
Source
# File lib/arel/nodes/window.rb, line 21 def partition *expr # FIXME: We SHOULD NOT be converting these to SqlLiteral automatically @partitions.concat expr.map { |x| String === x || Symbol === x ? Nodes::SqlLiteral.new(x.to_s) : x } self end
Source
# File lib/arel/nodes/window.rb, line 41 def range(expr = nil) if @framing Range.new(expr) else frame(Range.new(expr)) end end
Source
# File lib/arel/nodes/window.rb, line 33 def rows(expr = nil) if @framing Rows.new(expr) else frame(Rows.new(expr)) end end