do_postgres 0.10.12-x86-mingw32 → 0.10.13-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ChangeLog.markdown +5 -0
- data/README.markdown +20 -16
- data/ext/do_postgres/do_postgres.c +3 -3
- 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/version.rb +1 -1
- data/tasks/compile.rake +1 -1
- data/tasks/release.rake +1 -1
- metadata +18 -37
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
data.tar.gz: 0dd3260ec7349f45ed54708f8f70990e02913c15
|
4
|
+
metadata.gz: e1d92262604e27cffb26a1ff665f04fadb6357c5
|
5
|
+
SHA512:
|
6
|
+
data.tar.gz: cdd3e737aab5af089d2f69b9d86c286bc9277f756961045934798da49feef759192d074455795a47c8127bc0f9a93366c9b9ce175f801960713caa83f8d09cdc
|
7
|
+
metadata.gz: d60c882f14ac584c5aa373732fc76ab36e814f394dfec1a7a12e1a17466a3e635d05a5323e617e7c734fb8b878411d72cfa9534bff86087f466da1502fc34ac1
|
data/ChangeLog.markdown
CHANGED
data/README.markdown
CHANGED
@@ -14,14 +14,16 @@ This driver implements the DataObjects API for the PostgreSQL relational databas
|
|
14
14
|
|
15
15
|
An example of usage:
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
```ruby
|
18
|
+
# default user (postgres, postgres), default port (5432)
|
19
|
+
DataObjects::Connection.new("postgres://host/database")
|
20
|
+
# specified user, specified port
|
21
|
+
DataObjects::Connection.new("postgres://user:pass@host:8888/database")
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
23
|
+
@connection = DataObjects::Connection.new("postgres://localhost/employees")
|
24
|
+
@reader = @connection.create_command('SELECT * FROM users').execute_reader
|
25
|
+
@reader.next!
|
26
|
+
```
|
25
27
|
|
26
28
|
## Requirements
|
27
29
|
|
@@ -38,7 +40,9 @@ Additionally you should have the following prerequisites:
|
|
38
40
|
|
39
41
|
To install the gem:
|
40
42
|
|
41
|
-
|
43
|
+
```ruby
|
44
|
+
gem install do_postgres
|
45
|
+
```
|
42
46
|
|
43
47
|
To compile and install from source:
|
44
48
|
|
@@ -59,15 +63,15 @@ To compile and install from source:
|
|
59
63
|
* Run `rake-compiler cross-ruby`.
|
60
64
|
* Run `rake-compiler update-config`.
|
61
65
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
* For JRuby extensions:
|
67
|
+
* Install the Java Development Kit (provided if you are
|
68
|
+
on a recent version of Mac OS X) from <http://java.sun.com>.
|
69
|
+
* Install a recent version of JRuby. Ensure `jruby` is in your `PATH` and/or
|
70
|
+
you have configured the `JRUBY_HOME` environment variable to point to your
|
71
|
+
JRuby installation.
|
72
|
+
* Install `data_objects` and `do_jdbc` with `jruby -S rake install`.
|
69
73
|
|
70
|
-
|
74
|
+
* Then, install this driver with `(jruby -S) rake install`.
|
71
75
|
|
72
76
|
For more information, see the PostgreSQL driver wiki page:
|
73
77
|
<http://wiki.github.com/datamapper/do/postgresql>.
|
@@ -545,7 +545,8 @@ VALUE do_postgres_cCommand_execute_reader(int argc, VALUE *argv, VALUE self) {
|
|
545
545
|
PGconn *db = DATA_PTR(postgres_connection);
|
546
546
|
PGresult *response = do_postgres_cCommand_execute(self, connection, db, query);
|
547
547
|
|
548
|
-
|
548
|
+
int status = PQresultStatus(response);
|
549
|
+
if(status != PGRES_TUPLES_OK && status != PGRES_COMMAND_OK) {
|
549
550
|
do_postgres_raise_error(self, response, query);
|
550
551
|
}
|
551
552
|
|
@@ -565,8 +566,7 @@ VALUE do_postgres_cCommand_execute_reader(int argc, VALUE *argv, VALUE self) {
|
|
565
566
|
if (field_types == Qnil || 0 == RARRAY_LEN(field_types)) {
|
566
567
|
field_types = rb_ary_new();
|
567
568
|
infer_types = 1;
|
568
|
-
}
|
569
|
-
else if (RARRAY_LEN(field_types) != field_count) {
|
569
|
+
} else if (RARRAY_LEN(field_types) != field_count) {
|
570
570
|
// Whoops... wrong number of types passed to set_types. Close the reader and raise
|
571
571
|
// and error
|
572
572
|
rb_funcall(reader, rb_intern("close"), 0);
|
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.13'
|
74
74
|
end
|
75
75
|
end
|
76
76
|
rescue LoadError
|
data/tasks/release.rake
CHANGED
metadata
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: do_postgres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 10
|
8
|
-
- 12
|
9
|
-
version: 0.10.12
|
4
|
+
version: 0.10.13
|
10
5
|
platform: x86-mingw32
|
11
6
|
authors:
|
12
7
|
- Dirkjan Bussink
|
@@ -14,49 +9,38 @@ autorequire:
|
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
11
|
|
17
|
-
date: 2013-
|
18
|
-
default_executable:
|
12
|
+
date: 2013-05-27 00:00:00 Z
|
19
13
|
dependencies:
|
20
14
|
- !ruby/object:Gem::Dependency
|
21
|
-
prerelease: false
|
22
|
-
type: :runtime
|
23
|
-
name: data_objects
|
24
15
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
25
16
|
requirements:
|
26
17
|
- - "="
|
27
18
|
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
|
30
|
-
- 10
|
31
|
-
- 12
|
32
|
-
version: 0.10.12
|
19
|
+
version: 0.10.13
|
20
|
+
name: data_objects
|
33
21
|
requirement: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
22
|
prerelease: false
|
36
|
-
type: :
|
37
|
-
|
23
|
+
type: :runtime
|
24
|
+
- !ruby/object:Gem::Dependency
|
38
25
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
26
|
requirements:
|
40
27
|
- - ~>
|
41
28
|
- !ruby/object:Gem::Version
|
42
|
-
segments:
|
43
|
-
- 2
|
44
|
-
- 5
|
45
29
|
version: "2.5"
|
30
|
+
name: rspec
|
46
31
|
requirement: *id002
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
32
|
prerelease: false
|
49
33
|
type: :development
|
50
|
-
|
34
|
+
- !ruby/object:Gem::Dependency
|
51
35
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
52
36
|
requirements:
|
53
37
|
- - ~>
|
54
38
|
- !ruby/object:Gem::Version
|
55
|
-
segments:
|
56
|
-
- 0
|
57
|
-
- 7
|
58
39
|
version: "0.7"
|
40
|
+
name: rake-compiler
|
59
41
|
requirement: *id003
|
42
|
+
prerelease: false
|
43
|
+
type: :development
|
60
44
|
description: Implements the DataObjects API for PostgreSQL
|
61
45
|
email: d.bussink@gmail.com
|
62
46
|
executables: []
|
@@ -110,10 +94,12 @@ files:
|
|
110
94
|
- tasks/spec.rake
|
111
95
|
- lib/do_postgres/1.8/do_postgres.so
|
112
96
|
- lib/do_postgres/1.9/do_postgres.so
|
113
|
-
|
97
|
+
- lib/do_postgres/2.0/do_postgres.so
|
114
98
|
homepage:
|
115
99
|
licenses: []
|
116
100
|
|
101
|
+
metadata: {}
|
102
|
+
|
117
103
|
post_install_message: |+
|
118
104
|
|
119
105
|
======================================================================================================
|
@@ -148,22 +134,17 @@ require_paths:
|
|
148
134
|
- lib
|
149
135
|
required_ruby_version: !ruby/object:Gem::Requirement
|
150
136
|
requirements:
|
151
|
-
-
|
137
|
+
- &id004
|
138
|
+
- ">="
|
152
139
|
- !ruby/object:Gem::Version
|
153
|
-
segments:
|
154
|
-
- 0
|
155
140
|
version: "0"
|
156
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
142
|
requirements:
|
158
|
-
-
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
segments:
|
161
|
-
- 0
|
162
|
-
version: "0"
|
143
|
+
- *id004
|
163
144
|
requirements: []
|
164
145
|
|
165
146
|
rubyforge_project: dorb
|
166
|
-
rubygems_version:
|
147
|
+
rubygems_version: 2.0.3
|
167
148
|
signing_key:
|
168
149
|
specification_version: 3
|
169
150
|
summary: DataObjects PostgreSQL Driver
|