Skip to content
Browse files

When using the streaming extension, automatically use streaming to im…

…plement paging in Dataset#paged_each

Bump version to 1.6.9.
  • Loading branch information...
1 parent 3d53c78 commit 939d49a5eb9e326b072e50000b186f6ef3d1fdc8 @jeremyevans committed Mar 5, 2014
Showing with 14 additions and 1 deletion.
  1. +4 −0 CHANGELOG
  2. +5 −0 lib/sequel/extensions/pg_streaming.rb
  3. +5 −1 sequel_pg.gemspec
View
4 CHANGELOG
@@ -1,3 +1,7 @@
+=== 1.6.9 (2014-03-05)
+
+* When using the streaming extension, automatically use streaming to implement paging in Dataset#paged_each (jeremyevans)
+
=== 1.6.8 (2013-08-05)
* Allow overriding maximum allowed columns in a result set via -- --with-cflags=\"-DSPG_MAX_FIELDS=1600\" (jeremyevans) (#12)
View
5 lib/sequel/extensions/pg_streaming.rb
@@ -103,6 +103,11 @@ def fetch_rows(sql)
end
end
+ # Use streaming to implement paging.
+ def paged_each(opts=OPTS, &block)
+ stream.each(&block)
+ end
+
# Return a clone of the dataset that will use streaming to load
# rows.
def stream
View
6 sequel_pg.gemspec
@@ -1,6 +1,6 @@
SEQUEL_PG_GEMSPEC = Gem::Specification.new do |s|
s.name = 'sequel_pg'
- s.version = '1.6.8'
+ s.version = '1.6.9'
s.platform = Gem::Platform::RUBY
s.has_rdoc = false
s.extra_rdoc_files = ["README.rdoc", "CHANGELOG", "MIT-LICENSE"]
@@ -20,5 +20,9 @@ sequel_pg overwrites the inner loop of the Sequel postgres
adapter row fetching code with a C version. The C version
is significantly faster (2-6x) than the pure ruby version
that Sequel uses by default.
+
+sequel_pg also offers optimized versions of some dataset
+methods, as well as adds support for using PostgreSQL
+streaming.
END
end

0 comments on commit 939d49a

Please sign in to comment.
Something went wrong with that request. Please try again.