lib/ctes_in_my_pg.rb
def materialized(*args)
        @scope.with_values += args
        @scope.materialized_values += args
        @scope
      end
# Returns a new relation expressing WITH foo AS MATERIALIZED
Returns a new relation expressing WITH foo AS MATERIALIZED
Returns a new relation expressing WITH foo AS MATERIALIZED
def materialized(*args)
        @scope.with_values += args
        @scope.materialized_values += args
        @scope
      end
def materialized ( * args ) @scope . with_values += args @scope . materialized_values += args @scope end
Returns a new relation expressing WITH foo AS MATERIALIZED
Returns a new relation expressing WITH foo AS MATERIALIZED
args