class Arel::Nodes::Window
Attributes
framing[RW]
orders[RW]
Public Class Methods
new()
click to toggle source
# File lib/arel/nodes/window.rb, line 7 def initialize @orders = [] end
Public Instance Methods
frame(expr)
click to toggle source
# File lib/arel/nodes/window.rb, line 19 def frame(expr) raise ArgumentError, "Window frame cannot be set more than once" if @frame @framing = expr end
initialize_copy(other)
click to toggle source
Calls superclass method
# File lib/arel/nodes/window.rb, line 32 def initialize_copy other super @orders = @orders.map { |x| x.clone } end
order(*expr)
click to toggle source
# File lib/arel/nodes/window.rb, line 11 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
range(expr = nil)
click to toggle source
# File lib/arel/nodes/window.rb, line 28 def range(expr = nil) frame(Range.new(expr)) end
rows(expr = nil)
click to toggle source
# File lib/arel/nodes/window.rb, line 24 def rows(expr = nil) frame(Rows.new(expr)) end