postgresql_cursor 0.6.9 → 0.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/postgresql_cursor/cursor.rb +3 -6
- data/lib/postgresql_cursor/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2f3ff65f7729e47f2630546a0caa51c715cc06763c8ab85d0d1911c6d3378d90
|
|
4
|
+
data.tar.gz: 3b3c164c8a636d08cd0b6acc6d39c1744d7431f6114a151ac8dda01539534af8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d8ba42dcbf0aea30a3237b9a01cf58dacab95e8edfe5ba35bb7d0263ef5356a9c51d7e171478ff23bc58f9d01d6afdaa09bfad994ef2d8f193b0f83c804cb2a5
|
|
7
|
+
data.tar.gz: 8728363450c4aeb2a90ae1e89597d18302740bb463b7663ac5d4383cb0ff2f29ea669b2a12f35e111b7b42eb22b8bdac8865ec595c54f8d536295f1343e4081c
|
data/README.md
CHANGED
|
@@ -117,7 +117,7 @@ To limit the columns returned to just those you need, use `.select(:id, :name)`
|
|
|
117
117
|
query method.
|
|
118
118
|
|
|
119
119
|
```ruby
|
|
120
|
-
Product.select(:id, :name).
|
|
120
|
+
Product.select(:id, :name).each_instance { |product| product.process }
|
|
121
121
|
```
|
|
122
122
|
|
|
123
123
|
Pluck is a great alternative instead of using a cursor. It does not instantiate
|
|
@@ -298,12 +298,9 @@ module PostgreSQLCursor
|
|
|
298
298
|
# This is a value between 0.1 and 1.0 (PostgreSQL defaults to 0.1, this library defaults to 1.0)
|
|
299
299
|
# used to determine the expected fraction (percent) of result rows returned the the caller.
|
|
300
300
|
# This value determines the access path by the query planner.
|
|
301
|
-
def set_cursor_tuple_fraction
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
@cursor_tuple_fraction = frac
|
|
305
|
-
@result = @connection.execute("set cursor_tuple_fraction to #{frac}")
|
|
306
|
-
frac
|
|
301
|
+
def set_cursor_tuple_fraction
|
|
302
|
+
frac = @options.fetch(:fraction, 1.0)
|
|
303
|
+
@result = @connection.execute("set cursor_tuple_fraction to #{frac}")
|
|
307
304
|
end
|
|
308
305
|
end
|
|
309
306
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: postgresql_cursor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Allen Fair
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activerecord
|
|
@@ -134,7 +133,6 @@ homepage: http://github.com/afair/postgresql_cursor
|
|
|
134
133
|
licenses:
|
|
135
134
|
- MIT
|
|
136
135
|
metadata: {}
|
|
137
|
-
post_install_message:
|
|
138
136
|
rdoc_options: []
|
|
139
137
|
require_paths:
|
|
140
138
|
- lib
|
|
@@ -149,8 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
149
147
|
- !ruby/object:Gem::Version
|
|
150
148
|
version: '0'
|
|
151
149
|
requirements: []
|
|
152
|
-
rubygems_version:
|
|
153
|
-
signing_key:
|
|
150
|
+
rubygems_version: 4.0.6
|
|
154
151
|
specification_version: 4
|
|
155
152
|
summary: ActiveRecord PostgreSQL Adapter extension for using a cursor to return a
|
|
156
153
|
large result set
|