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