Sha256: 4d6c5e48f127c773dfa2bda9e0d0a33fafd040a0ccaacb6d5aace8abe28e0f9c

Contents?: true

Size: 297 Bytes

Versions: 4

Compression:

Stored size: 297 Bytes

Contents

module ActiveRecord::Querying
  delegate :with, :ranked, to: :all

  def from_cte(name, expression)
    table = Arel::Table.new(name)

    cte_proxy = CTEProxy.new(name, self)
    relation = ActiveRecord::Relation.new cte_proxy, cte_proxy.arel_table
    relation.with name => expression
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
postgres_ext-3.0.1 lib/postgres_ext/active_record/querying.rb
postgres_ext-3.0.0 lib/postgres_ext/active_record/querying.rb
postgres_ext-2.4.1 lib/postgres_ext/active_record/querying.rb
postgres_ext-2.4.0 lib/postgres_ext/active_record/querying.rb