postgres-pr 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/og/test.rb +1 -1
- data/lib/postgres-pr/connection.rb +5 -2
- data/lib/postgres-pr/version.rb +1 -1
- metadata +2 -2
data/examples/og/test.rb
CHANGED
@@ -15,6 +15,9 @@ PROTO_VERSION = 3 << 16 #196608
|
|
15
15
|
|
16
16
|
class Connection
|
17
17
|
|
18
|
+
# A block which is called with the NoticeResponse object as parameter.
|
19
|
+
attr_accessor :notice_processor
|
20
|
+
|
18
21
|
def initialize(database, user, password=nil, uri = nil)
|
19
22
|
uri ||= DEFAULT_URI
|
20
23
|
|
@@ -51,7 +54,7 @@ class Connection
|
|
51
54
|
when ErrorResponse
|
52
55
|
raise msg.field_values.join("\t")
|
53
56
|
when NoticeResponse
|
54
|
-
|
57
|
+
@notice_processor.call(msg) if @notice_processor
|
55
58
|
when ParameterStatus
|
56
59
|
@params[msg.key] = msg.value
|
57
60
|
when BackendKeyData
|
@@ -103,7 +106,7 @@ class Connection
|
|
103
106
|
# TODO
|
104
107
|
errors << msg
|
105
108
|
when NoticeResponse
|
106
|
-
|
109
|
+
@notice_processor.call(msg) if @notice_processor
|
107
110
|
else
|
108
111
|
# TODO
|
109
112
|
end
|
data/lib/postgres-pr/version.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: postgres-pr
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.3.
|
7
|
-
date: 2005-01-
|
6
|
+
version: 0.3.5
|
7
|
+
date: 2005-01-22
|
8
8
|
summary: A pure Ruby interface to the PostgreSQL (>= 7.4) database
|
9
9
|
require_paths:
|
10
10
|
- lib
|