module ROM::Plugins::Relation::SQL::Postgres::Streaming

PG-specific extensions which adds `Relation#stream` method

@api public

Public Class Methods

included(klass) click to toggle source
Calls superclass method
# File lib/rom/plugins/relation/sql/postgres/streaming.rb, line 36
def self.included(klass)
  super
  ROM::Relation::Graph.include(Combined)
  ROM::Relation::Composite.include(Composite)
end

Public Instance Methods

stream_each() click to toggle source

Allows you to stream returned rows one at a time, instead of collecting the entire result set in memory. Requires the `sequel_pg` gem

@see github.com/jeremyevans/sequel_pg#streaming- sequel_pg docs

@example

posts.steam_each { |post| puts CSV.generate_line(post) }

@return [Relation]

@api publicY_VERSION

# File lib/rom/plugins/relation/sql/postgres/streaming.rb, line 54
def stream_each
  raise StreamingNotSupportedError, "not supported on jruby"
end