Method: Arel::Nodes::Window#partition

Defined in:
activerecord/lib/arel/nodes/window.rb

#partition(*expr) ⇒ Object



22
23
24
25
26
27
28
# File 'activerecord/lib/arel/nodes/window.rb', line 22

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