rdbi-driver-postgresql 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE +1 -1
- data/README.txt +2 -2
- data/Rakefile +7 -8
- data/lib/rdbi/driver/postgresql.rb +5 -5
- data/rdbi-driver-postgresql.gemspec +8 -12
- data/test/test_database.rb +5 -5
- metadata +56 -54
- data/.gemtest +0 -0
- data/Manifest.txt +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 708e392655e739919e82dc4a7ec607faa650861028c77cc6ab6d5b7d44d07baa
|
4
|
+
data.tar.gz: b4613d51d08919533d37de86d6ec9415be46f409dffac934d1612b3b5950d520
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e960098334a6a1d4612edcf4a78a18c301c009f98a4d33b1030eaa95148bb76cd1ebc61ac28db8ca851382123d4f3f48c55aea218d288ec236e7fbac14febc9
|
7
|
+
data.tar.gz: 9828e7a3519d83aa624eb0731cb54e274f3ba8d15555a5df1f14f0a645cd203dbc7d679f1d5484ede673b3000ec8ae3f33796689f92f9a138cb6e36bfd88dda8
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT Licence
|
2
2
|
|
3
|
-
Copyright (c) 2010 Pistos, Erik Hollensbe
|
3
|
+
Copyright (c) 2010-2019 Pistos, Erik Hollensbe
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.txt
CHANGED
@@ -5,12 +5,12 @@ The PostgreSQL database driver for RDBI.
|
|
5
5
|
== Requirements
|
6
6
|
|
7
7
|
* Ruby 1.8.7+
|
8
|
-
* "pg" gem, version
|
8
|
+
* "pg" gem, version 1.0+
|
9
9
|
* "rdbi" gem
|
10
10
|
|
11
11
|
== Copyright
|
12
12
|
|
13
|
-
Copyright (c) 2010-
|
13
|
+
Copyright (c) 2010-2019 Pistos. See LICENCE for details.
|
14
14
|
|
15
15
|
== Acknowledgements
|
16
16
|
|
data/Rakefile
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'hoe'
|
5
5
|
|
6
|
-
Hoe.plugins.delete :rubyforge
|
7
6
|
Hoe.plugin :git
|
8
7
|
Hoe.plugin :rcov
|
9
8
|
Hoe.plugin :roodi
|
@@ -13,8 +12,6 @@ spec = Hoe.spec 'rdbi-driver-postgresql' do
|
|
13
12
|
developer 'Pistos', 'pistos@purepistos.net'
|
14
13
|
developer 'Erik Hollensbe', 'erik@hollensbe.org'
|
15
14
|
|
16
|
-
self.rubyforge_name = nil
|
17
|
-
|
18
15
|
self.description = <<-EOF
|
19
16
|
This is the PostgreSQL driver for RDBI.
|
20
17
|
|
@@ -26,9 +23,11 @@ spec = Hoe.spec 'rdbi-driver-postgresql' do
|
|
26
23
|
EOF
|
27
24
|
|
28
25
|
self.summary = 'PostgreSQL driver for RDBI';
|
29
|
-
self.
|
30
|
-
|
31
|
-
|
26
|
+
self.urls = {
|
27
|
+
'github' => 'https://github.com/rdbi/rdbi-driver-postgresql'
|
28
|
+
}
|
29
|
+
|
30
|
+
require_ruby_version '>= 1.8.7'
|
32
31
|
|
33
32
|
extra_dev_deps << ['hoe-roodi']
|
34
33
|
extra_dev_deps << ['hoe-reek']
|
@@ -37,10 +36,10 @@ spec = Hoe.spec 'rdbi-driver-postgresql' do
|
|
37
36
|
extra_deps << ['rdbi']
|
38
37
|
extra_deps << ['pg', '>= 0.10.0']
|
39
38
|
|
40
|
-
desc
|
39
|
+
desc 'install a gem without sudo'
|
41
40
|
end
|
42
41
|
|
43
42
|
task :install => [:gem] do
|
44
|
-
sh
|
43
|
+
sh 'gem install pkg/#{spec.name}-#{spec.version}.gem'
|
45
44
|
end
|
46
45
|
# vim: syntax=ruby
|
@@ -3,7 +3,7 @@ require 'epoxy'
|
|
3
3
|
require 'pg'
|
4
4
|
|
5
5
|
class RDBI::Driver::PostgreSQL < RDBI::Driver
|
6
|
-
VERSION =
|
6
|
+
VERSION = '0.10.0'
|
7
7
|
|
8
8
|
def initialize( *args )
|
9
9
|
super( Database, *args )
|
@@ -17,7 +17,7 @@ class RDBI::Driver::PostgreSQL < RDBI::Driver
|
|
17
17
|
def initialize( *args )
|
18
18
|
super( *args )
|
19
19
|
self.database_name = @connect_args[:dbname] || @connect_args[:database] || @connect_args[:db]
|
20
|
-
@pg_conn =
|
20
|
+
@pg_conn = PG::Connection.new(
|
21
21
|
@connect_args[:host] || @connect_args[:hostname],
|
22
22
|
@connect_args[:port],
|
23
23
|
@connect_args[:options],
|
@@ -128,8 +128,8 @@ class RDBI::Driver::PostgreSQL < RDBI::Driver
|
|
128
128
|
start = Time.now
|
129
129
|
rows = begin
|
130
130
|
execute("SELECT 1").result_count
|
131
|
-
rescue
|
132
|
-
# XXX Sorry this sucks.
|
131
|
+
rescue PG::Error => e
|
132
|
+
# XXX Sorry this sucks. PG::Connection is completely useless without a
|
133
133
|
# connection... like asking it if it's connected.
|
134
134
|
raise RDBI::DisconnectedError.new(e.message)
|
135
135
|
end
|
@@ -228,7 +228,7 @@ class RDBI::Driver::PostgreSQL < RDBI::Driver
|
|
228
228
|
protected
|
229
229
|
|
230
230
|
def fetch_range(start, stop)
|
231
|
-
# XXX when did
|
231
|
+
# XXX when did PG::Result get so stupid?
|
232
232
|
ary = []
|
233
233
|
(start..stop).each do |i|
|
234
234
|
row = []
|
@@ -1,17 +1,12 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
1
|
Gem::Specification.new do |s|
|
7
2
|
s.name = %q{rdbi-driver-postgresql}
|
8
|
-
s.version = "0.
|
3
|
+
s.version = "0.10.0"
|
9
4
|
|
10
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
6
|
s.authors = ["Pistos", "Erik Hollensbe"]
|
12
|
-
s.date = %q{
|
7
|
+
s.date = %q{2019-06-11}
|
13
8
|
s.description = %q{PostgreSQL driver for RDBI}
|
14
|
-
s.email = %q{rdbi
|
9
|
+
s.email = %q{rdbi dawt pistos aet purepistos dawt net}
|
15
10
|
s.extra_rdoc_files = [
|
16
11
|
"LICENSE",
|
17
12
|
"README.txt"
|
@@ -27,8 +22,9 @@ Gem::Specification.new do |s|
|
|
27
22
|
"test/test_database.rb"
|
28
23
|
]
|
29
24
|
s.homepage = %q{http://github.com/Pistos/rdbi-dbd-postgresql}
|
25
|
+
s.licenses = ['MIT']
|
30
26
|
s.require_paths = ["lib"]
|
31
|
-
s.rubygems_version = %q{
|
27
|
+
s.rubygems_version = %q{3.0.3}
|
32
28
|
s.summary = %q{PostgreSQL driver for RDBI}
|
33
29
|
s.test_files = [
|
34
30
|
"test/helper.rb",
|
@@ -44,7 +40,7 @@ Gem::Specification.new do |s|
|
|
44
40
|
s.add_development_dependency(%q<rdoc>, [">= 0"])
|
45
41
|
s.add_development_dependency(%q<rdbi-dbrc>, [">= 0"])
|
46
42
|
s.add_runtime_dependency(%q<rdbi>, [">= 0"])
|
47
|
-
s.add_runtime_dependency(%q<pg>, ["
|
43
|
+
s.add_runtime_dependency(%q<pg>, [">= 1.0.0"])
|
48
44
|
s.add_runtime_dependency(%q<methlab>, [">= 0"])
|
49
45
|
s.add_runtime_dependency(%q<epoxy>, [">= 0.3.1"])
|
50
46
|
else
|
@@ -52,7 +48,7 @@ Gem::Specification.new do |s|
|
|
52
48
|
s.add_dependency(%q<rdoc>, [">= 0"])
|
53
49
|
s.add_dependency(%q<rdbi-dbrc>, [">= 0"])
|
54
50
|
s.add_dependency(%q<rdbi>, [">= 0"])
|
55
|
-
s.add_dependency(%q<pg>, ["
|
51
|
+
s.add_dependency(%q<pg>, [">= 1.0.0"])
|
56
52
|
s.add_dependency(%q<methlab>, [">= 0"])
|
57
53
|
s.add_dependency(%q<epoxy>, [">= 0.3.1"])
|
58
54
|
end
|
@@ -61,7 +57,7 @@ Gem::Specification.new do |s|
|
|
61
57
|
s.add_dependency(%q<rdoc>, [">= 0"])
|
62
58
|
s.add_dependency(%q<rdbi-dbrc>, [">= 0"])
|
63
59
|
s.add_dependency(%q<rdbi>, [">= 0"])
|
64
|
-
s.add_dependency(%q<pg>, ["
|
60
|
+
s.add_dependency(%q<pg>, [">= 1.0.0"])
|
65
61
|
s.add_dependency(%q<methlab>, [">= 0"])
|
66
62
|
s.add_dependency(%q<epoxy>, [">= 0.3.1"])
|
67
63
|
end
|
data/test/test_database.rb
CHANGED
@@ -88,7 +88,7 @@ class TestDatabase < Test::Unit::TestCase
|
|
88
88
|
assert_equal( 1, res )
|
89
89
|
end
|
90
90
|
|
91
|
-
assert_equal( dbh.last_statement
|
91
|
+
assert_equal( dbh.last_statement, sth )
|
92
92
|
|
93
93
|
sth2 = dbh.prepare( "select * from foo" )
|
94
94
|
assert sth
|
@@ -283,11 +283,11 @@ class TestDatabase < Test::Unit::TestCase
|
|
283
283
|
|
284
284
|
result = dbh.execute( "SELECT id, cardinal FROM ordinals ORDER BY id" )
|
285
285
|
rows = result.fetch( :all, RDBI::Result::Driver::Array )
|
286
|
-
assert_kind_of(
|
287
|
-
assert_kind_of(
|
286
|
+
assert_kind_of( Integer, rows[ 0 ][ 0 ] )
|
287
|
+
assert_kind_of( Integer, rows[ 0 ][ 1 ] )
|
288
288
|
rows = result.fetch( :all, RDBI::Result::Driver::Struct )
|
289
|
-
assert_kind_of(
|
290
|
-
assert_kind_of(
|
289
|
+
assert_kind_of( Integer, rows[ 0 ][ :id ] )
|
290
|
+
assert_kind_of( Integer, rows[ 0 ][ :cardinal ] )
|
291
291
|
end
|
292
292
|
|
293
293
|
def test_10_table_schema
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdbi-driver-postgresql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pistos
|
@@ -9,111 +9,115 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-06-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: test-unit
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0'
|
21
|
-
type: :
|
21
|
+
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: rdoc
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0
|
35
|
-
type: :
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0
|
41
|
+
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
43
|
+
name: rdbi-dbrc
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
57
|
+
name: rdbi
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
|
-
type: :
|
63
|
+
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
71
|
+
name: pg
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 1.0.0
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 1.0.0
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: methlab
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
75
89
|
- !ruby/object:Gem::Version
|
76
90
|
version: '0'
|
77
|
-
type: :
|
91
|
+
type: :runtime
|
78
92
|
prerelease: false
|
79
93
|
version_requirements: !ruby/object:Gem::Requirement
|
80
94
|
requirements:
|
81
|
-
- -
|
95
|
+
- - ">="
|
82
96
|
- !ruby/object:Gem::Version
|
83
97
|
version: '0'
|
84
98
|
- !ruby/object:Gem::Dependency
|
85
|
-
name:
|
99
|
+
name: epoxy
|
86
100
|
requirement: !ruby/object:Gem::Requirement
|
87
101
|
requirements:
|
88
|
-
- -
|
102
|
+
- - ">="
|
89
103
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
91
|
-
type: :
|
104
|
+
version: 0.3.1
|
105
|
+
type: :runtime
|
92
106
|
prerelease: false
|
93
107
|
version_requirements: !ruby/object:Gem::Requirement
|
94
108
|
requirements:
|
95
|
-
- -
|
109
|
+
- - ">="
|
96
110
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
98
|
-
description:
|
99
|
-
|
100
|
-
|
101
|
-
RDBI is a database interface built out of small parts. A micro framework for
|
102
|
-
databases, RDBI works with and extends libraries like 'typelib' and 'epoxy'
|
103
|
-
to provide type conversion and binding facilities. Via a driver/adapter
|
104
|
-
system it provides database access. RDBI itself provides pooling and other
|
105
|
-
enhanced database features.
|
106
|
-
email:
|
107
|
-
- pistos@purepistos.net
|
108
|
-
- erik@hollensbe.org
|
111
|
+
version: 0.3.1
|
112
|
+
description: PostgreSQL driver for RDBI
|
113
|
+
email: rdbi dawt pistos aet purepistos dawt net
|
109
114
|
executables: []
|
110
115
|
extensions: []
|
111
116
|
extra_rdoc_files:
|
112
|
-
-
|
117
|
+
- LICENSE
|
113
118
|
- README.txt
|
114
119
|
files:
|
115
120
|
- LICENSE
|
116
|
-
- Manifest.txt
|
117
121
|
- README.txt
|
118
122
|
- Rakefile
|
119
123
|
- lib/rdbi-driver-postgresql.rb
|
@@ -121,31 +125,29 @@ files:
|
|
121
125
|
- rdbi-driver-postgresql.gemspec
|
122
126
|
- test/helper.rb
|
123
127
|
- test/test_database.rb
|
124
|
-
|
125
|
-
|
126
|
-
|
128
|
+
homepage: http://github.com/Pistos/rdbi-dbd-postgresql
|
129
|
+
licenses:
|
130
|
+
- MIT
|
127
131
|
metadata: {}
|
128
132
|
post_install_message:
|
129
|
-
rdoc_options:
|
130
|
-
- --main
|
131
|
-
- README.txt
|
133
|
+
rdoc_options: []
|
132
134
|
require_paths:
|
133
135
|
- lib
|
134
136
|
required_ruby_version: !ruby/object:Gem::Requirement
|
135
137
|
requirements:
|
136
|
-
- -
|
138
|
+
- - ">="
|
137
139
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
140
|
+
version: '0'
|
139
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
142
|
requirements:
|
141
|
-
- -
|
143
|
+
- - ">="
|
142
144
|
- !ruby/object:Gem::Version
|
143
145
|
version: '0'
|
144
146
|
requirements: []
|
145
|
-
|
146
|
-
rubygems_version: 2.0.3
|
147
|
+
rubygems_version: 3.0.3
|
147
148
|
signing_key:
|
148
|
-
specification_version:
|
149
|
+
specification_version: 3
|
149
150
|
summary: PostgreSQL driver for RDBI
|
150
151
|
test_files:
|
152
|
+
- test/helper.rb
|
151
153
|
- test/test_database.rb
|
data/.gemtest
DELETED
File without changes
|