postgresql_cursor 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/postgresql_cursor.rb +1 -0
- data/lib/postgresql_cursor/cursor.rb +4 -4
- data/lib/postgresql_cursor/version.rb +3 -1
- data/postgresql_cursor.gemspec +32 -20
- metadata +25 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f0d7815c65eeeeb83cc41344d0e4a76906236c43392f837e9e2ba7bb14277a7
|
4
|
+
data.tar.gz: 66b9dbcb6a17046a2d1338297f0b9e4233b46467bd0efb76a663db5d6cfcb4be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc42f9f219afb24cbbe15abf0829de57b8f3c8002a3658e931bfbc97a065d080706e500ba86b3a3bacf8778ca824032556497f520ee1153348f8f9057fc98b6b
|
7
|
+
data.tar.gz: ec58f29782cfac48985b1c8d491726cfb23ebc1cefae89766045bff36989b238e01a10fa0eb6f436efdc0446b73395b6fdb32f13cfd239166b3713736c4d8f20
|
data/Rakefile
CHANGED
@@ -11,7 +11,7 @@ end
|
|
11
11
|
|
12
12
|
desc "Open and IRB Console with the gem and test-app loaded"
|
13
13
|
task :console do
|
14
|
-
sh "bundle exec irb -Ilib -I . -r postgresql_cursor -r test-app/app"
|
14
|
+
sh "bundle exec irb -Ilib -I . -r pg -r postgresql_cursor -r test-app/app"
|
15
15
|
#require 'irb'
|
16
16
|
#ARGV.clear
|
17
17
|
#IRB.start
|
data/lib/postgresql_cursor.rb
CHANGED
@@ -232,14 +232,14 @@ module PostgreSQLCursor
|
|
232
232
|
fields.each_with_index do |fname, i|
|
233
233
|
ftype = @result.ftype i
|
234
234
|
fmod = @result.fmod i
|
235
|
-
types[fname] = @connection.get_type_map.fetch(ftype, fmod)
|
235
|
+
types[fname] = @connection.get_type_map.fetch(ftype, fmod) do |oid, mod|
|
236
236
|
warn "unknown OID: #{fname}(#{oid}) (#{sql})"
|
237
237
|
if ::ActiveRecord::VERSION::MAJOR <= 4
|
238
|
-
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Identity.new
|
238
|
+
::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Identity.new
|
239
239
|
else
|
240
|
-
ActiveRecord::
|
240
|
+
::ActiveRecord::Type::Value.new
|
241
241
|
end
|
242
|
-
|
242
|
+
end
|
243
243
|
end
|
244
244
|
|
245
245
|
@column_types = types
|
data/postgresql_cursor.gemspec
CHANGED
@@ -1,32 +1,44 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'postgresql_cursor/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
8
|
+
spec.name = 'postgresql_cursor'
|
8
9
|
spec.version = PostgresqlCursor::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
11
|
-
spec.summary =
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
spec.authors = ['Allen Fair']
|
11
|
+
spec.email = ['allen.fair@gmail.com']
|
12
|
+
spec.summary = <<-SUMMARY
|
13
|
+
ActiveRecord PostgreSQL Adapter extension for using a cursor to return a
|
14
|
+
large result set
|
15
|
+
SUMMARY
|
16
|
+
spec.description = <<-DESCRIPTION
|
17
|
+
PostgreSQL Cursor is an extension to the ActiveRecord PostgreSQLAdapter for
|
18
|
+
very large result sets. It provides a cursor open/fetch/close interface to
|
19
|
+
access data without loading all rows into memory, and instead loads the result
|
20
|
+
rows in 'chunks' (default of 1_000 rows), buffers them, and returns the rows
|
21
|
+
one at a time.
|
22
|
+
DESCRIPTION
|
23
|
+
spec.homepage = 'http://github.com/afair/postgresql_cursor'
|
24
|
+
spec.license = 'MIT'
|
15
25
|
|
16
26
|
spec.files = `git ls-files -z`.split("\x0")
|
17
27
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
28
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = [
|
29
|
+
spec.require_paths = ['lib']
|
30
|
+
|
31
|
+
# Remove this for jruby which should use 'activerecord-jdbcpostgresql-adapter'
|
32
|
+
# spec.add_dependency 'pg'
|
20
33
|
|
21
|
-
|
22
|
-
spec.add_dependency
|
23
|
-
#spec.add_dependency
|
24
|
-
#
|
25
|
-
#spec.add_dependency
|
26
|
-
#spec.add_dependency "activerecord", "~> 4.1.0"
|
27
|
-
#spec.add_dependency "activerecord", "~> 5.0.0.beta2"
|
34
|
+
spec.add_dependency 'activerecord', '>= 3.1.0'
|
35
|
+
# spec.add_dependency 'activerecord', '~> 3.1.0'
|
36
|
+
# spec.add_dependency 'activerecord', '~> 4.1.0'
|
37
|
+
# spec.add_dependency 'activerecord', '~> 5.0.0'
|
38
|
+
# spec.add_dependency 'activerecord', '~> 6.0.0'
|
28
39
|
|
29
|
-
spec.add_development_dependency
|
30
|
-
spec.add_development_dependency
|
31
|
-
spec.add_development_dependency
|
40
|
+
spec.add_development_dependency 'irb'
|
41
|
+
spec.add_development_dependency 'minitest'
|
42
|
+
spec.add_development_dependency 'pg'
|
43
|
+
spec.add_development_dependency 'rake'
|
32
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allen Fair
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: irb
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,21 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: pg
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
@@ -66,10 +80,12 @@ dependencies:
|
|
66
80
|
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
|
-
description:
|
70
|
-
|
71
|
-
|
72
|
-
|
83
|
+
description: |2
|
84
|
+
PostgreSQL Cursor is an extension to the ActiveRecord PostgreSQLAdapter for
|
85
|
+
very large result sets. It provides a cursor open/fetch/close interface to
|
86
|
+
access data without loading all rows into memory, and instead loads the result
|
87
|
+
rows in 'chunks' (default of 1_000 rows), buffers them, and returns the rows
|
88
|
+
one at a time.
|
73
89
|
email:
|
74
90
|
- allen.fair@gmail.com
|
75
91
|
executables: []
|