pg 0.21.0 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/ChangeLog +0 -6595
- data/History.rdoc +184 -0
- data/Manifest.txt +8 -3
- data/README-Windows.rdoc +4 -4
- data/README.ja.rdoc +1 -2
- data/README.rdoc +58 -13
- data/Rakefile +10 -9
- data/Rakefile.cross +68 -71
- data/ext/errorcodes.def +76 -0
- data/ext/errorcodes.rb +1 -1
- data/ext/errorcodes.txt +21 -2
- data/ext/extconf.rb +18 -36
- data/ext/gvl_wrappers.c +4 -0
- data/ext/gvl_wrappers.h +23 -39
- data/ext/pg.c +154 -144
- data/ext/pg.h +68 -95
- data/ext/pg_binary_decoder.c +82 -15
- data/ext/pg_binary_encoder.c +13 -12
- data/ext/pg_coder.c +73 -12
- data/ext/pg_connection.c +699 -459
- data/ext/pg_copy_coder.c +16 -8
- data/ext/pg_record_coder.c +491 -0
- data/ext/pg_result.c +571 -195
- data/ext/pg_text_decoder.c +606 -40
- data/ext/pg_text_encoder.c +185 -54
- data/ext/pg_tuple.c +549 -0
- data/ext/pg_type_map.c +1 -1
- data/ext/pg_type_map_all_strings.c +4 -4
- data/ext/pg_type_map_by_class.c +9 -4
- data/ext/pg_type_map_by_column.c +7 -6
- data/ext/pg_type_map_by_mri_type.c +1 -1
- data/ext/pg_type_map_by_oid.c +3 -2
- data/ext/pg_type_map_in_ruby.c +1 -1
- data/ext/{util.c → pg_util.c} +10 -10
- data/ext/{util.h → pg_util.h} +2 -2
- data/lib/pg.rb +8 -10
- data/lib/pg/basic_type_mapping.rb +121 -25
- data/lib/pg/binary_decoder.rb +23 -0
- data/lib/pg/coder.rb +23 -2
- data/lib/pg/connection.rb +28 -4
- data/lib/pg/constants.rb +2 -1
- data/lib/pg/exceptions.rb +2 -1
- data/lib/pg/result.rb +14 -2
- data/lib/pg/text_decoder.rb +21 -26
- data/lib/pg/text_encoder.rb +32 -8
- data/lib/pg/tuple.rb +30 -0
- data/lib/pg/type_map_by_column.rb +3 -2
- data/spec/helpers.rb +61 -33
- data/spec/pg/basic_type_mapping_spec.rb +362 -37
- data/spec/pg/connection_spec.rb +602 -329
- data/spec/pg/connection_sync_spec.rb +41 -0
- data/spec/pg/result_spec.rb +242 -17
- data/spec/pg/tuple_spec.rb +333 -0
- data/spec/pg/type_map_by_class_spec.rb +2 -2
- data/spec/pg/type_map_by_column_spec.rb +6 -2
- data/spec/pg/type_map_by_mri_type_spec.rb +1 -1
- data/spec/pg/type_map_by_oid_spec.rb +3 -3
- data/spec/pg/type_map_in_ruby_spec.rb +1 -1
- data/spec/pg/type_map_spec.rb +1 -1
- data/spec/pg/type_spec.rb +364 -18
- data/spec/pg_spec.rb +2 -2
- metadata +48 -43
- metadata.gz.sig +0 -0
- data/lib/pg/deprecated_constants.rb +0 -21
data/spec/pg_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# -*- rspec -*-
|
2
2
|
# encoding: utf-8
|
3
3
|
|
4
4
|
require_relative 'helpers'
|
@@ -7,7 +7,7 @@ require 'pg'
|
|
7
7
|
|
8
8
|
describe PG do
|
9
9
|
|
10
|
-
it "knows what version of the libpq library is loaded"
|
10
|
+
it "knows what version of the libpq library is loaded" do
|
11
11
|
expect( PG.library_version ).to be_an( Integer )
|
12
12
|
expect( PG.library_version ).to be >= 90100
|
13
13
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
@@ -11,32 +11,30 @@ bindir: bin
|
|
11
11
|
cert_chain:
|
12
12
|
- |
|
13
13
|
-----BEGIN CERTIFICATE-----
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|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2DIVuYH7aLHfjZDQv/mNgpAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYD
|
26
|
+
VR0PBAQDAgSwMB0GA1UdDgQWBBRyjf55EbrHagiRLqt5YAd3yb8k4DANBgkqhkiG
|
27
|
+
9w0BAQsFAAOCAYEAifxlz7x0EfT3fjhM520ZEIrWa+tLMuLKNefkY18u8tZnx4EX
|
28
|
+
Xxwh3tna3fvNfrOrdY5leIj1dbv4FTRg+gIBnIxAySqvpGvI/Axg5EdYbwninCLL
|
29
|
+
LAKCmRo+5QwaPMYN2zdHIjGrp8jg1neCo5zy6tVvyTv0DMI6FLrydVJYduMMDFSy
|
30
|
+
gQKR1rVOcCJtnBnLCF9+kKEUKohAHOmGsE7OBZFnjMIpH5yUDUVJKByv0gIipFt0
|
31
|
+
1T6zff6oVU0w8WBiNKR381+6sF3wIZVnVY0XeJg6hNL+YecE8ILxLhHTmtT/BO0S
|
32
|
+
3xPze9uXDR+iD6HYl8KU5QEg/dXFPhfQb512vVkTJDZvMcwu6PxDUjHFChLjAji/
|
33
|
+
AZXjg1C5E9znTkeUR8ieU9F1MOKoiH57a5lYSTI8Ga8PpsNXTxNeXc16Ob26CqrJ
|
34
|
+
83uuAYSy65yXDGXXPVBeKPVnYrqp91pqpS5Nh7wfuiCrE8lgU8PATh7K4BV1UhAT
|
35
|
+
0MHbAT42wTYkfUj3
|
38
36
|
-----END CERTIFICATE-----
|
39
|
-
date:
|
37
|
+
date: 2020-03-18 00:00:00.000000000 Z
|
40
38
|
dependencies:
|
41
39
|
- !ruby/object:Gem::Dependency
|
42
40
|
name: hoe-mercurial
|
@@ -58,14 +56,14 @@ dependencies:
|
|
58
56
|
requirements:
|
59
57
|
- - "~>"
|
60
58
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
59
|
+
version: '0.10'
|
62
60
|
type: :development
|
63
61
|
prerelease: false
|
64
62
|
version_requirements: !ruby/object:Gem::Requirement
|
65
63
|
requirements:
|
66
64
|
- - "~>"
|
67
65
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
66
|
+
version: '0.10'
|
69
67
|
- !ruby/object:Gem::Dependency
|
70
68
|
name: hoe-highline
|
71
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +98,14 @@ dependencies:
|
|
100
98
|
requirements:
|
101
99
|
- - "~>"
|
102
100
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0
|
101
|
+
version: '1.0'
|
104
102
|
type: :development
|
105
103
|
prerelease: false
|
106
104
|
version_requirements: !ruby/object:Gem::Requirement
|
107
105
|
requirements:
|
108
106
|
- - "~>"
|
109
107
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0
|
108
|
+
version: '1.0'
|
111
109
|
- !ruby/object:Gem::Dependency
|
112
110
|
name: hoe-bundler
|
113
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,18 +154,18 @@ dependencies:
|
|
156
154
|
requirements:
|
157
155
|
- - "~>"
|
158
156
|
- !ruby/object:Gem::Version
|
159
|
-
version: '3.
|
157
|
+
version: '3.20'
|
160
158
|
type: :development
|
161
159
|
prerelease: false
|
162
160
|
version_requirements: !ruby/object:Gem::Requirement
|
163
161
|
requirements:
|
164
162
|
- - "~>"
|
165
163
|
- !ruby/object:Gem::Version
|
166
|
-
version: '3.
|
164
|
+
version: '3.20'
|
167
165
|
description: |-
|
168
166
|
Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/].
|
169
167
|
|
170
|
-
It works with {PostgreSQL 9.
|
168
|
+
It works with {PostgreSQL 9.2 and later}[http://www.postgresql.org/support/versioning/].
|
171
169
|
|
172
170
|
A small example usage:
|
173
171
|
|
@@ -209,9 +207,11 @@ extra_rdoc_files:
|
|
209
207
|
- ext/pg_connection.c
|
210
208
|
- ext/pg_copy_coder.c
|
211
209
|
- ext/pg_errors.c
|
210
|
+
- ext/pg_record_coder.c
|
212
211
|
- ext/pg_result.c
|
213
212
|
- ext/pg_text_decoder.c
|
214
213
|
- ext/pg_text_encoder.c
|
214
|
+
- ext/pg_tuple.c
|
215
215
|
- ext/pg_type_map.c
|
216
216
|
- ext/pg_type_map_all_strings.c
|
217
217
|
- ext/pg_type_map_by_class.c
|
@@ -219,7 +219,7 @@ extra_rdoc_files:
|
|
219
219
|
- ext/pg_type_map_by_mri_type.c
|
220
220
|
- ext/pg_type_map_by_oid.c
|
221
221
|
- ext/pg_type_map_in_ruby.c
|
222
|
-
- ext/
|
222
|
+
- ext/pg_util.c
|
223
223
|
files:
|
224
224
|
- ".gemtest"
|
225
225
|
- BSDL
|
@@ -249,9 +249,11 @@ files:
|
|
249
249
|
- ext/pg_connection.c
|
250
250
|
- ext/pg_copy_coder.c
|
251
251
|
- ext/pg_errors.c
|
252
|
+
- ext/pg_record_coder.c
|
252
253
|
- ext/pg_result.c
|
253
254
|
- ext/pg_text_decoder.c
|
254
255
|
- ext/pg_text_encoder.c
|
256
|
+
- ext/pg_tuple.c
|
255
257
|
- ext/pg_type_map.c
|
256
258
|
- ext/pg_type_map_all_strings.c
|
257
259
|
- ext/pg_type_map_by_class.c
|
@@ -259,28 +261,31 @@ files:
|
|
259
261
|
- ext/pg_type_map_by_mri_type.c
|
260
262
|
- ext/pg_type_map_by_oid.c
|
261
263
|
- ext/pg_type_map_in_ruby.c
|
262
|
-
- ext/
|
263
|
-
- ext/
|
264
|
+
- ext/pg_util.c
|
265
|
+
- ext/pg_util.h
|
264
266
|
- ext/vc/pg.sln
|
265
267
|
- ext/vc/pg_18/pg.vcproj
|
266
268
|
- ext/vc/pg_19/pg_19.vcproj
|
267
269
|
- lib/pg.rb
|
268
270
|
- lib/pg/basic_type_mapping.rb
|
271
|
+
- lib/pg/binary_decoder.rb
|
269
272
|
- lib/pg/coder.rb
|
270
273
|
- lib/pg/connection.rb
|
271
274
|
- lib/pg/constants.rb
|
272
|
-
- lib/pg/deprecated_constants.rb
|
273
275
|
- lib/pg/exceptions.rb
|
274
276
|
- lib/pg/result.rb
|
275
277
|
- lib/pg/text_decoder.rb
|
276
278
|
- lib/pg/text_encoder.rb
|
279
|
+
- lib/pg/tuple.rb
|
277
280
|
- lib/pg/type_map_by_column.rb
|
278
281
|
- spec/data/expected_trace.out
|
279
282
|
- spec/data/random_binary_data
|
280
283
|
- spec/helpers.rb
|
281
284
|
- spec/pg/basic_type_mapping_spec.rb
|
282
285
|
- spec/pg/connection_spec.rb
|
286
|
+
- spec/pg/connection_sync_spec.rb
|
283
287
|
- spec/pg/result_spec.rb
|
288
|
+
- spec/pg/tuple_spec.rb
|
284
289
|
- spec/pg/type_map_by_class_spec.rb
|
285
290
|
- spec/pg/type_map_by_column_spec.rb
|
286
291
|
- spec/pg/type_map_by_mri_type_spec.rb
|
@@ -289,10 +294,11 @@ files:
|
|
289
294
|
- spec/pg/type_map_spec.rb
|
290
295
|
- spec/pg/type_spec.rb
|
291
296
|
- spec/pg_spec.rb
|
292
|
-
homepage: https://
|
297
|
+
homepage: https://github.com/ged/ruby-pg
|
293
298
|
licenses:
|
294
|
-
- BSD-
|
295
|
-
metadata:
|
299
|
+
- BSD-2-Clause
|
300
|
+
metadata:
|
301
|
+
homepage_uri: https://github.com/ged/ruby-pg
|
296
302
|
post_install_message:
|
297
303
|
rdoc_options:
|
298
304
|
- "--main"
|
@@ -303,15 +309,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
303
309
|
requirements:
|
304
310
|
- - ">="
|
305
311
|
- !ruby/object:Gem::Version
|
306
|
-
version: 2.
|
312
|
+
version: '2.2'
|
307
313
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
308
314
|
requirements:
|
309
315
|
- - ">="
|
310
316
|
- !ruby/object:Gem::Version
|
311
317
|
version: '0'
|
312
318
|
requirements: []
|
313
|
-
|
314
|
-
rubygems_version: 2.6.12
|
319
|
+
rubygems_version: 3.0.6
|
315
320
|
signing_key:
|
316
321
|
specification_version: 4
|
317
322
|
summary: Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# -*- ruby -*-
|
2
|
-
#encoding: utf-8
|
3
|
-
|
4
|
-
# Warn about use of deprecated constants when this is autoloaded
|
5
|
-
callsite = caller(3).first
|
6
|
-
|
7
|
-
warn <<END_OF_WARNING
|
8
|
-
The PGconn, PGresult, and PGError constants are deprecated, and will be
|
9
|
-
removed as of version 1.0.
|
10
|
-
|
11
|
-
You should use PG::Connection, PG::Result, and PG::Error instead, respectively.
|
12
|
-
|
13
|
-
Called from #{callsite}
|
14
|
-
END_OF_WARNING
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
PGconn = PG::Connection
|
19
|
-
PGresult = PG::Result
|
20
|
-
PGError = PG::Error
|
21
|
-
|