nuodb 1.0.2 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +11 -6
- data/{CONTRIBUTION.rdoc → CONTRIBUTION.md} +20 -19
- data/Gemfile +1 -1
- data/Gemfile.lock +56 -0
- data/History.txt +3 -0
- data/README.md +43 -0
- data/Rakefile +1 -1
- data/ext/nuodb/nuodb.cpp +440 -790
- data/lib/nuodb/version.rb +1 -1
- data/nuodb.gemspec +1 -1
- data/spec/functional/datatypes_spec.rb +1 -1
- data/spec/functional/generated_keys_spec.rb +7 -4
- data/spec/functional/statement_spec.rb +7 -6
- metadata +57 -28
- checksums.yaml +0 -7
- data/README.rdoc +0 -36
- data/install-nuodb.sh +0 -5
data/lib/nuodb/version.rb
CHANGED
data/nuodb.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = 'BSD'
|
15
15
|
|
16
16
|
spec.rdoc_options = %w(--charset=UTF-8)
|
17
|
-
spec.extra_rdoc_files = %w[AUTHORS README.rdoc LICENSE]
|
17
|
+
#spec.extra_rdoc_files = %w[AUTHORS README.rdoc LICENSE]
|
18
18
|
|
19
19
|
spec.extensions = %w(ext/nuodb/extconf.rb)
|
20
20
|
|
@@ -1,6 +1,10 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'nuodb'
|
3
3
|
|
4
|
+
def notlessthan12
|
5
|
+
not ['1.0.1','1.0.2','1.1','1.1.1'].include?(ENV['NUODB_VERSION'])
|
6
|
+
end
|
7
|
+
|
4
8
|
describe NuoDB::Statement do
|
5
9
|
|
6
10
|
attr_reader :connection
|
@@ -86,11 +90,10 @@ describe NuoDB::Statement do
|
|
86
90
|
}.should_not raise_error(NuoDB::DatabaseError, /can't assign a value to generated always identity/)
|
87
91
|
end
|
88
92
|
|
89
|
-
it "should raise an error when attempting to provide your own key and its a dupe" do
|
90
|
-
statement.execute("INSERT INTO test_generated_keys (id, data) VALUES (1,5)")
|
93
|
+
it "should raise an error when attempting to provide your own key and its a dupe", :if => notlessthan12 do
|
91
94
|
lambda {
|
92
95
|
statement.execute("INSERT INTO test_generated_keys (id, data) VALUES (1,5)")
|
93
|
-
}.
|
96
|
+
}.should raise_error(NuoDB::DatabaseError, /duplicate value in unique index TEST_GENERATED_KEYS..PRIMARY_KEY/)
|
94
97
|
end
|
95
98
|
|
96
99
|
it "generated_keys should return the most recently created generated key" do
|
@@ -134,4 +137,4 @@ describe NuoDB::Statement do
|
|
134
137
|
|
135
138
|
end
|
136
139
|
|
137
|
-
end
|
140
|
+
end
|
@@ -143,11 +143,12 @@ describe NuoDB::Statement do
|
|
143
143
|
columns[3].type.should eql(:date)
|
144
144
|
columns[4].type.should eql(:time)
|
145
145
|
|
146
|
-
|
147
|
-
columns[
|
148
|
-
columns[
|
149
|
-
columns[
|
150
|
-
columns[
|
146
|
+
#default not supported
|
147
|
+
#columns[0].default.should eql(4)
|
148
|
+
#columns[1].default.should be_nil
|
149
|
+
#columns[2].default.should be_nil
|
150
|
+
#columns[3].default.should be_nil
|
151
|
+
#columns[4].default.should be_nil
|
151
152
|
|
152
153
|
columns[0].null.should be_true
|
153
154
|
columns[1].null.should be_false
|
@@ -197,4 +198,4 @@ describe NuoDB::Statement do
|
|
197
198
|
|
198
199
|
# TODO END
|
199
200
|
|
200
|
-
end
|
201
|
+
end
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nuodb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.1'
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Robert Buck
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-04
|
12
|
+
date: 2013-09-04 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: erubis
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,6 +30,7 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rake
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -41,6 +46,7 @@ dependencies:
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: rdoc
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
51
|
- - ~>
|
46
52
|
- !ruby/object:Gem::Version
|
@@ -48,6 +54,7 @@ dependencies:
|
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
59
|
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
@@ -55,6 +62,7 @@ dependencies:
|
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: hanna-nouveau
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ~>
|
60
68
|
- !ruby/object:Gem::Version
|
@@ -62,6 +70,7 @@ dependencies:
|
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - ~>
|
67
76
|
- !ruby/object:Gem::Version
|
@@ -69,104 +78,119 @@ dependencies:
|
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: rake
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
|
-
- - '>='
|
83
|
+
- - ! '>='
|
74
84
|
- !ruby/object:Gem::Version
|
75
85
|
version: '0'
|
76
86
|
type: :development
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
|
-
- - '>='
|
91
|
+
- - ! '>='
|
81
92
|
- !ruby/object:Gem::Version
|
82
93
|
version: '0'
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: rdoc
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
|
-
- - '>='
|
99
|
+
- - ! '>='
|
88
100
|
- !ruby/object:Gem::Version
|
89
101
|
version: '0'
|
90
102
|
type: :development
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
|
-
- - '>='
|
107
|
+
- - ! '>='
|
95
108
|
- !ruby/object:Gem::Version
|
96
109
|
version: '0'
|
97
110
|
- !ruby/object:Gem::Dependency
|
98
111
|
name: simplecov
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
100
114
|
requirements:
|
101
|
-
- - '>='
|
115
|
+
- - ! '>='
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
107
122
|
requirements:
|
108
|
-
- - '>='
|
123
|
+
- - ! '>='
|
109
124
|
- !ruby/object:Gem::Version
|
110
125
|
version: '0'
|
111
126
|
- !ruby/object:Gem::Dependency
|
112
127
|
name: hanna-nouveau
|
113
128
|
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
114
130
|
requirements:
|
115
|
-
- - '>='
|
131
|
+
- - ! '>='
|
116
132
|
- !ruby/object:Gem::Version
|
117
133
|
version: '0'
|
118
134
|
type: :development
|
119
135
|
prerelease: false
|
120
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
121
138
|
requirements:
|
122
|
-
- - '>='
|
139
|
+
- - ! '>='
|
123
140
|
- !ruby/object:Gem::Version
|
124
141
|
version: '0'
|
125
142
|
- !ruby/object:Gem::Dependency
|
126
143
|
name: rubydoc
|
127
144
|
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
128
146
|
requirements:
|
129
|
-
- - '>='
|
147
|
+
- - ! '>='
|
130
148
|
- !ruby/object:Gem::Version
|
131
149
|
version: '0'
|
132
150
|
type: :development
|
133
151
|
prerelease: false
|
134
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
135
154
|
requirements:
|
136
|
-
- - '>='
|
155
|
+
- - ! '>='
|
137
156
|
- !ruby/object:Gem::Version
|
138
157
|
version: '0'
|
139
158
|
- !ruby/object:Gem::Dependency
|
140
159
|
name: sdoc
|
141
160
|
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
142
162
|
requirements:
|
143
|
-
- - '>='
|
163
|
+
- - ! '>='
|
144
164
|
- !ruby/object:Gem::Version
|
145
165
|
version: '0'
|
146
166
|
type: :development
|
147
167
|
prerelease: false
|
148
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
149
170
|
requirements:
|
150
|
-
- - '>='
|
171
|
+
- - ! '>='
|
151
172
|
- !ruby/object:Gem::Version
|
152
173
|
version: '0'
|
153
174
|
- !ruby/object:Gem::Dependency
|
154
175
|
name: ruby-prof
|
155
176
|
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
156
178
|
requirements:
|
157
|
-
- - '>='
|
179
|
+
- - ! '>='
|
158
180
|
- !ruby/object:Gem::Version
|
159
181
|
version: '0'
|
160
182
|
type: :development
|
161
183
|
prerelease: false
|
162
184
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
163
186
|
requirements:
|
164
|
-
- - '>='
|
187
|
+
- - ! '>='
|
165
188
|
- !ruby/object:Gem::Version
|
166
189
|
version: '0'
|
167
190
|
- !ruby/object:Gem::Dependency
|
168
191
|
name: rspec
|
169
192
|
requirement: !ruby/object:Gem::Requirement
|
193
|
+
none: false
|
170
194
|
requirements:
|
171
195
|
- - ~>
|
172
196
|
- !ruby/object:Gem::Version
|
@@ -174,6 +198,7 @@ dependencies:
|
|
174
198
|
type: :development
|
175
199
|
prerelease: false
|
176
200
|
version_requirements: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
177
202
|
requirements:
|
178
203
|
- - ~>
|
179
204
|
- !ruby/object:Gem::Version
|
@@ -181,6 +206,7 @@ dependencies:
|
|
181
206
|
- !ruby/object:Gem::Dependency
|
182
207
|
name: rspec-core
|
183
208
|
requirement: !ruby/object:Gem::Requirement
|
209
|
+
none: false
|
184
210
|
requirements:
|
185
211
|
- - ~>
|
186
212
|
- !ruby/object:Gem::Version
|
@@ -188,6 +214,7 @@ dependencies:
|
|
188
214
|
type: :development
|
189
215
|
prerelease: false
|
190
216
|
version_requirements: !ruby/object:Gem::Requirement
|
217
|
+
none: false
|
191
218
|
requirements:
|
192
219
|
- - ~>
|
193
220
|
- !ruby/object:Gem::Version
|
@@ -195,6 +222,7 @@ dependencies:
|
|
195
222
|
- !ruby/object:Gem::Dependency
|
196
223
|
name: rspec-expectations
|
197
224
|
requirement: !ruby/object:Gem::Requirement
|
225
|
+
none: false
|
198
226
|
requirements:
|
199
227
|
- - ~>
|
200
228
|
- !ruby/object:Gem::Version
|
@@ -202,6 +230,7 @@ dependencies:
|
|
202
230
|
type: :development
|
203
231
|
prerelease: false
|
204
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
none: false
|
205
234
|
requirements:
|
206
235
|
- - ~>
|
207
236
|
- !ruby/object:Gem::Version
|
@@ -209,6 +238,7 @@ dependencies:
|
|
209
238
|
- !ruby/object:Gem::Dependency
|
210
239
|
name: rspec-mocks
|
211
240
|
requirement: !ruby/object:Gem::Requirement
|
241
|
+
none: false
|
212
242
|
requirements:
|
213
243
|
- - ~>
|
214
244
|
- !ruby/object:Gem::Version
|
@@ -216,6 +246,7 @@ dependencies:
|
|
216
246
|
type: :development
|
217
247
|
prerelease: false
|
218
248
|
version_requirements: !ruby/object:Gem::Requirement
|
249
|
+
none: false
|
219
250
|
requirements:
|
220
251
|
- - ~>
|
221
252
|
- !ruby/object:Gem::Version
|
@@ -226,27 +257,24 @@ email:
|
|
226
257
|
executables: []
|
227
258
|
extensions:
|
228
259
|
- ext/nuodb/extconf.rb
|
229
|
-
extra_rdoc_files:
|
230
|
-
- AUTHORS
|
231
|
-
- README.rdoc
|
232
|
-
- LICENSE
|
260
|
+
extra_rdoc_files: []
|
233
261
|
files:
|
234
262
|
- .gitignore
|
235
263
|
- .rspec
|
236
264
|
- .travis.yml
|
237
265
|
- AUTHORS
|
238
|
-
- CONTRIBUTION.
|
266
|
+
- CONTRIBUTION.md
|
239
267
|
- Gemfile
|
268
|
+
- Gemfile.lock
|
240
269
|
- History.txt
|
241
270
|
- LICENSE
|
242
271
|
- Manifest.txt
|
243
|
-
- README.
|
272
|
+
- README.md
|
244
273
|
- Rakefile
|
245
274
|
- ext/nuodb/atomic.c
|
246
275
|
- ext/nuodb/atomic.h
|
247
276
|
- ext/nuodb/extconf.rb
|
248
277
|
- ext/nuodb/nuodb.cpp
|
249
|
-
- install-nuodb.sh
|
250
278
|
- lib/nuodb.rb
|
251
279
|
- lib/nuodb/column.rb
|
252
280
|
- lib/nuodb/error.rb
|
@@ -274,7 +302,6 @@ files:
|
|
274
302
|
homepage: http://nuodb.github.com/ruby-nuodb/
|
275
303
|
licenses:
|
276
304
|
- BSD
|
277
|
-
metadata: {}
|
278
305
|
post_install_message:
|
279
306
|
rdoc_options:
|
280
307
|
- --charset=UTF-8
|
@@ -282,20 +309,22 @@ require_paths:
|
|
282
309
|
- lib
|
283
310
|
- ext
|
284
311
|
required_ruby_version: !ruby/object:Gem::Requirement
|
312
|
+
none: false
|
285
313
|
requirements:
|
286
|
-
- - '>='
|
314
|
+
- - ! '>='
|
287
315
|
- !ruby/object:Gem::Version
|
288
316
|
version: '0'
|
289
317
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
318
|
+
none: false
|
290
319
|
requirements:
|
291
|
-
- - '>='
|
320
|
+
- - ! '>='
|
292
321
|
- !ruby/object:Gem::Version
|
293
322
|
version: '0'
|
294
323
|
requirements: []
|
295
324
|
rubyforge_project:
|
296
|
-
rubygems_version:
|
325
|
+
rubygems_version: 1.8.23
|
297
326
|
signing_key:
|
298
|
-
specification_version:
|
327
|
+
specification_version: 3
|
299
328
|
summary: Native Ruby driver for NuoDB.
|
300
329
|
test_files:
|
301
330
|
- spec/data/.gitignore
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 4a188eadf80dbae5f39c9aa6c545d2fb9e243924
|
4
|
-
data.tar.gz: 9b50a86ab1282b32d483f7f5f9b3c136900b08e7
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: a324d17ba28db0fe9c577149898cb934f19c6575af25145a2270c03e296c1042b59949b2b948e517426343b56f03cc33efaad43489d5eace556ef8df4ed7fe4b
|
7
|
-
data.tar.gz: 329d6d9b37c385bc19dc7d98b34db40bcb94efc7172a0b208a639a7305a3f103481d750a28ca59cee33dc12aa659164417de7afc19aeef16671e720bcc160f53
|
data/README.rdoc
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
= Ruby/NuoDB Interface {<img src="https://api.travis-ci.org/nuodb/ruby-nuodb.png?branch=master" alt="Build Status" />}[http://travis-ci.org/nuodb/ruby-nuodb] {<img src="https://gemnasium.com/nuodb/ruby-nuodb.png?travis" alt="Dependency Status" />}[https://gemnasium.com/nuodb/ruby-nuodb] {<img src="https://codeclimate.com/github/nuodb/ruby-nuodb.png" />}[https://codeclimate.com/github/nuodb/ruby-nuodb]
|
2
|
-
|
3
|
-
This is the official Ruby Gem for {NuoDB}[http://www.nuodb.com/]. It wraps the NuoDB C++ API, providing a natural API for Ruby.
|
4
|
-
|
5
|
-
To use NuoDB with Rails you will also want the {ActiveRecord NuoDB Adapter}[https://github.com/nuodb/ruby-activerecord-nuodb-adapter]
|
6
|
-
|
7
|
-
Note: At this time the Ruby/NuoDB Interface does not support Windows.
|
8
|
-
|
9
|
-
== Getting Started
|
10
|
-
|
11
|
-
1. If you haven't already, {Download and Install NuoDB}[http://nuodb.com/download-nuodb/]
|
12
|
-
|
13
|
-
2. Install the gem
|
14
|
-
|
15
|
-
gem install nuodb
|
16
|
-
|
17
|
-
3. Use NuoDB in Ruby
|
18
|
-
|
19
|
-
require "nuodb"
|
20
|
-
|
21
|
-
conn = NuoDB::Connection.new(:database => 'test@localhost', :username => 'dba', :password => 'goalie', :schema => 'hockey')
|
22
|
-
stmt = conn.statement
|
23
|
-
stmt.execute("SELECT * FROM hockey")
|
24
|
-
stmt.results.each do |res|
|
25
|
-
puts res.inspect
|
26
|
-
end
|
27
|
-
|
28
|
-
== More Information
|
29
|
-
|
30
|
-
* {Ruby/NuoDB Interface Rdoc}[http://nuodb.github.io/ruby-nuodb/rdoc/]
|
31
|
-
* {NuoDB Community Forum}[http://www.nuodb.com/community/forum.php]
|
32
|
-
* {NuoDB Online Documentation}[http://www.nuodb.com/community/documentation.php]
|
33
|
-
|
34
|
-
== Contributing
|
35
|
-
|
36
|
-
See {Contribution}[link:CONTRIBUTION.rdoc] for information about contributing to the Ruby ActiveRecord NuoDB Adapter.
|