do_postgres 0.10.14-x86-mingw32 → 0.10.15-x86-mingw32
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 +4 -4
- data/ChangeLog.markdown +6 -0
- data/ext/do_postgres/do_common.c +2 -2
- data/ext/do_postgres/do_common.h +1 -1
- data/ext/do_postgres/do_postgres.c +19 -6
- data/ext/do_postgres/extconf.rb +1 -1
- data/lib/do_postgres/1.8/do_postgres.so +0 -0
- data/lib/do_postgres/1.9/do_postgres.so +0 -0
- data/lib/do_postgres/2.0/do_postgres.so +0 -0
- data/lib/do_postgres/2.1/do_postgres.so +0 -0
- data/lib/do_postgres/2.2/do_postgres.so +0 -0
- data/lib/do_postgres/version.rb +1 -1
- data/tasks/compile.rake +1 -1
- data/tasks/release.rake +1 -1
- metadata +16 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a307e99a311cc40f8edecbffc89e03b5a07c154
|
4
|
+
data.tar.gz: d1cb5d7fee5289f19ad87d8aa423b98dc51c0387
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5a426c9ebaafa6dbf57456d8c188c8ce947d85d5fde38da04720e78c87165805c97b84db9216a6dcd9e8d90407d9ad240289cb6f7e4ff765769e7c7fe379651
|
7
|
+
data.tar.gz: 2ae60d301d1eee31530914023685819b490132f508c03c0f9fdb6decdd39a313e3d668b4be916845b78ff5a00d7caed1407c46a8fb4af4fc6e691d6fbf8e2e9f
|
data/ChangeLog.markdown
CHANGED
data/ext/do_postgres/do_common.c
CHANGED
@@ -63,7 +63,7 @@ void data_objects_debug(VALUE connection, VALUE string, struct timeval *start) {
|
|
63
63
|
rb_funcall(connection, DO_ID_LOG, 1, message);
|
64
64
|
}
|
65
65
|
|
66
|
-
void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum,
|
66
|
+
void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, VALUE message, VALUE query, VALUE state) {
|
67
67
|
const char *exception_type = "SQLError";
|
68
68
|
const struct errcodes *e;
|
69
69
|
VALUE uri, exception;
|
@@ -82,7 +82,7 @@ void data_objects_raise_error(VALUE self, const struct errcodes *errors, int err
|
|
82
82
|
data_objects_const_get(mDO, exception_type),
|
83
83
|
DO_ID_NEW,
|
84
84
|
5,
|
85
|
-
|
85
|
+
message,
|
86
86
|
INT2NUM(errnum),
|
87
87
|
state,
|
88
88
|
query,
|
data/ext/do_postgres/do_common.h
CHANGED
@@ -123,7 +123,7 @@ static inline void data_objects_define_errors(VALUE scope, const struct errcodes
|
|
123
123
|
}
|
124
124
|
}
|
125
125
|
|
126
|
-
extern void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum,
|
126
|
+
extern void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, VALUE message, VALUE query, VALUE state);
|
127
127
|
|
128
128
|
extern VALUE data_objects_typecast(const char *value, long length, const VALUE type, int encoding);
|
129
129
|
|
@@ -32,6 +32,18 @@
|
|
32
32
|
#endif
|
33
33
|
|
34
34
|
|
35
|
+
#ifndef HAVE_RB_THREAD_FD_SELECT
|
36
|
+
#define rb_fdset_t fd_set
|
37
|
+
#define rb_fd_isset(n, f) FD_ISSET(n, f)
|
38
|
+
#define rb_fd_init(f) FD_ZERO(f)
|
39
|
+
#define rb_fd_zero(f) FD_ZERO(f)
|
40
|
+
#define rb_fd_set(n, f) FD_SET(n, f)
|
41
|
+
#define rb_fd_clr(n, f) FD_CLR(n, f)
|
42
|
+
#define rb_fd_term(f)
|
43
|
+
#define rb_thread_fd_select rb_thread_select
|
44
|
+
#endif
|
45
|
+
|
46
|
+
|
35
47
|
#include <ruby.h>
|
36
48
|
#include <string.h>
|
37
49
|
#include <math.h>
|
@@ -99,13 +111,14 @@ VALUE do_postgres_typecast(const char *value, long length, const VALUE type, int
|
|
99
111
|
}
|
100
112
|
|
101
113
|
void do_postgres_raise_error(VALUE self, PGresult *result, VALUE query) {
|
102
|
-
|
114
|
+
VALUE message = rb_str_new2(PQresultErrorMessage(result));
|
103
115
|
char *sql_state = PQresultErrorField(result, PG_DIAG_SQLSTATE);
|
104
116
|
int postgres_errno = MAKE_SQLSTATE(sql_state[0], sql_state[1], sql_state[2], sql_state[3], sql_state[4]);
|
117
|
+
VALUE str = rb_str_new2(sql_state);
|
105
118
|
|
106
119
|
PQclear(result);
|
107
120
|
|
108
|
-
data_objects_raise_error(self, do_postgres_errors, postgres_errno, message, query,
|
121
|
+
data_objects_raise_error(self, do_postgres_errors, postgres_errno, message, query, str);
|
109
122
|
}
|
110
123
|
|
111
124
|
/* ====== Public API ======= */
|
@@ -269,12 +282,12 @@ PGresult * do_postgres_cCommand_execute_async(VALUE self, VALUE connection, PGco
|
|
269
282
|
}
|
270
283
|
|
271
284
|
int socket_fd = PQsocket(db);
|
272
|
-
|
285
|
+
rb_fdset_t rset;
|
273
286
|
|
274
287
|
while (1) {
|
275
|
-
|
276
|
-
|
277
|
-
retval =
|
288
|
+
rb_fd_init(&rset);
|
289
|
+
rb_fd_set(socket_fd, &rset);
|
290
|
+
retval = rb_thread_fd_select(socket_fd + 1, &rset, NULL, NULL, NULL);
|
278
291
|
|
279
292
|
if (retval < 0) {
|
280
293
|
rb_sys_fail(0);
|
data/ext/do_postgres/extconf.rb
CHANGED
@@ -31,7 +31,7 @@ dir_config('pgsql-server', config_value('includedir-server'), config_value('libd
|
|
31
31
|
dir_config('pgsql-client', config_value('includedir'), config_value('libdir'))
|
32
32
|
dir_config('pgsql-win32') if RUBY_PLATFORM =~ /mswin|mingw/
|
33
33
|
|
34
|
-
desired_functions = %w(localtime_r gmtime_r PQsetClientEncoding pg_encoding_to_char PQfreemem)
|
34
|
+
desired_functions = %w(localtime_r gmtime_r PQsetClientEncoding pg_encoding_to_char PQfreemem rb_thread_fd_select)
|
35
35
|
compat_functions = %w(PQescapeString PQexecParams)
|
36
36
|
|
37
37
|
if have_build_env
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/do_postgres/version.rb
CHANGED
data/tasks/compile.rake
CHANGED
@@ -70,7 +70,7 @@ begin
|
|
70
70
|
ext.classpath = '../do_jdbc/lib/do_jdbc_internal.jar'
|
71
71
|
ext.java_compiling do |gem|
|
72
72
|
gem.add_dependency 'jdbc-postgres', '>=8.2'
|
73
|
-
gem.add_dependency 'do_jdbc', '0.10.
|
73
|
+
gem.add_dependency 'do_jdbc', '0.10.15'
|
74
74
|
end
|
75
75
|
end
|
76
76
|
rescue LoadError
|
data/tasks/release.rake
CHANGED
@@ -3,7 +3,7 @@ task :build_all do
|
|
3
3
|
`rake clean`
|
4
4
|
`rake build`
|
5
5
|
`rake java gem`
|
6
|
-
`rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.3:2.0.0`
|
6
|
+
`rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.3:2.0.0:2.1.5:2.2.0`
|
7
7
|
end
|
8
8
|
|
9
9
|
desc 'Release all gems (native, binaries for JRuby and Windows)'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: do_postgres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.15
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Dirkjan Bussink
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: data_objects
|
@@ -16,40 +16,40 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.10.
|
19
|
+
version: 0.10.15
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.10.
|
26
|
+
version: 0.10.15
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.5'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake-compiler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0.7'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.7'
|
55
55
|
description: Implements the DataObjects API for PostgreSQL
|
@@ -73,9 +73,6 @@ files:
|
|
73
73
|
- ext/do_postgres/extconf.rb
|
74
74
|
- ext/do_postgres/pg_config.h
|
75
75
|
- lib/do_postgres.rb
|
76
|
-
- lib/do_postgres/1.8/do_postgres.so
|
77
|
-
- lib/do_postgres/1.9/do_postgres.so
|
78
|
-
- lib/do_postgres/2.0/do_postgres.so
|
79
76
|
- lib/do_postgres/encoding.rb
|
80
77
|
- lib/do_postgres/transaction.rb
|
81
78
|
- lib/do_postgres/version.rb
|
@@ -104,6 +101,11 @@ files:
|
|
104
101
|
- tasks/release.rake
|
105
102
|
- tasks/retrieve.rake
|
106
103
|
- tasks/spec.rake
|
104
|
+
- lib/do_postgres/1.8/do_postgres.so
|
105
|
+
- lib/do_postgres/1.9/do_postgres.so
|
106
|
+
- lib/do_postgres/2.0/do_postgres.so
|
107
|
+
- lib/do_postgres/2.1/do_postgres.so
|
108
|
+
- lib/do_postgres/2.2/do_postgres.so
|
107
109
|
homepage:
|
108
110
|
licenses: []
|
109
111
|
metadata: {}
|
@@ -140,17 +142,17 @@ require_paths:
|
|
140
142
|
- lib
|
141
143
|
required_ruby_version: !ruby/object:Gem::Requirement
|
142
144
|
requirements:
|
143
|
-
- -
|
145
|
+
- - '>='
|
144
146
|
- !ruby/object:Gem::Version
|
145
147
|
version: '0'
|
146
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
149
|
requirements:
|
148
|
-
- -
|
150
|
+
- - '>='
|
149
151
|
- !ruby/object:Gem::Version
|
150
152
|
version: '0'
|
151
153
|
requirements: []
|
152
154
|
rubyforge_project: dorb
|
153
|
-
rubygems_version: 2.
|
155
|
+
rubygems_version: 2.0.14
|
154
156
|
signing_key:
|
155
157
|
specification_version: 3
|
156
158
|
summary: DataObjects PostgreSQL Driver
|