jeremyevans-postgres-pr 0.6.6 → 0.6.7
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 +5 -5
- data/lib/postgres-pr/connection.rb +2 -2
- data/lib/postgres-pr/message.rb +13 -0
- data/lib/postgres-pr/typeconv/array.rb +1 -1
- data/lib/postgres-pr/version.rb +1 -1
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 38bfb795e9675aebda17231820f02f1b578d2827bc0ebe35e9df082d0c5d80ab
|
4
|
+
data.tar.gz: 5dd8129a92c3b7149c2ba902bd55751f8115961f9899e33ad56fc5aa57cf6376
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1eb144a11dfab4ccee3b72369b89e94cad3c291abd47f73c7a9373d391c7588cd14d705c199a689780577f22a553bf5b7982f32b35338e9e63ce10e38a4cba00
|
7
|
+
data.tar.gz: d19a812984b4a917fecee8c4efa7a4d6e421d483ed0b136c8a8f4f99156f5eaa01ab40e3de367f2318d4b99cdde7199ffbe48eda818cb887015f217f358da4d2
|
@@ -52,7 +52,7 @@ class Connection
|
|
52
52
|
|
53
53
|
@conn << StartupMessage.new(PROTO_VERSION, 'user' => user, 'database' => database).dump
|
54
54
|
|
55
|
-
|
55
|
+
while true
|
56
56
|
msg = Message.read(@conn)
|
57
57
|
|
58
58
|
case msg
|
@@ -115,7 +115,7 @@ class Connection
|
|
115
115
|
result = Result.new
|
116
116
|
errors = []
|
117
117
|
|
118
|
-
|
118
|
+
while true
|
119
119
|
msg = Message.read(@conn)
|
120
120
|
case msg
|
121
121
|
when DataRow
|
data/lib/postgres-pr/message.rb
CHANGED
@@ -421,6 +421,19 @@ class Query < Message
|
|
421
421
|
register_message_type 'Q'
|
422
422
|
fields :query
|
423
423
|
|
424
|
+
case RUBY_VERSION
|
425
|
+
when /\A1.8/
|
426
|
+
# nothing to do
|
427
|
+
when /\A1.9/
|
428
|
+
def initialize(query)
|
429
|
+
@query = String.new(query).force_encoding('BINARY')
|
430
|
+
end
|
431
|
+
else
|
432
|
+
def initialize(query)
|
433
|
+
@query = query.b
|
434
|
+
end
|
435
|
+
end
|
436
|
+
|
424
437
|
def dump
|
425
438
|
super(@query.size + 1) do |buffer|
|
426
439
|
buffer.write_cstring(@query)
|
data/lib/postgres-pr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jeremyevans-postgres-pr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Evans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: code@jeremyevans.net
|
@@ -16,25 +16,25 @@ executables: []
|
|
16
16
|
extensions: []
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
|
+
- examples/client.rb
|
20
|
+
- examples/og/test.rb
|
21
|
+
- examples/server.rb
|
22
|
+
- examples/test_connection.rb
|
23
|
+
- lib/binary_reader.rb
|
24
|
+
- lib/binary_writer.rb
|
25
|
+
- lib/buffer.rb
|
26
|
+
- lib/byteorder.rb
|
27
|
+
- lib/postgres-pr/connection.rb
|
28
|
+
- lib/postgres-pr/message.rb
|
29
|
+
- lib/postgres-pr/postgres-compat.rb
|
19
30
|
- lib/postgres-pr/typeconv/TC_conv.rb
|
20
31
|
- lib/postgres-pr/typeconv/array.rb
|
21
32
|
- lib/postgres-pr/typeconv/bytea.rb
|
22
33
|
- lib/postgres-pr/typeconv/conv.rb
|
23
|
-
- lib/postgres-pr/connection.rb
|
24
|
-
- lib/postgres-pr/message.rb
|
25
|
-
- lib/postgres-pr/postgres-compat.rb
|
26
34
|
- lib/postgres-pr/version.rb
|
27
|
-
- lib/binary_reader.rb
|
28
|
-
- lib/binary_writer.rb
|
29
|
-
- lib/buffer.rb
|
30
|
-
- lib/byteorder.rb
|
31
35
|
- lib/postgres.rb
|
32
36
|
- test/TC_message.rb
|
33
|
-
|
34
|
-
- examples/client.rb
|
35
|
-
- examples/server.rb
|
36
|
-
- examples/test_connection.rb
|
37
|
-
homepage:
|
37
|
+
homepage: https://github.com/jeremyevans/postgres-pr
|
38
38
|
licenses: []
|
39
39
|
metadata: {}
|
40
40
|
post_install_message:
|
@@ -43,18 +43,18 @@ require_paths:
|
|
43
43
|
- lib
|
44
44
|
required_ruby_version: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
54
|
requirements:
|
55
55
|
- PostgreSQL >= 7.4
|
56
56
|
rubyforge_project:
|
57
|
-
rubygems_version: 2.
|
57
|
+
rubygems_version: 2.7.6
|
58
58
|
signing_key:
|
59
59
|
specification_version: 4
|
60
60
|
summary: A pure Ruby interface to the PostgreSQL (>= 7.4) database
|