simpleOracleJDBC 0.1.1 → 0.1.2
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.
- data/lib/simple_oracle_jdbc/bindings.rb +10 -4
- data/test/helper.rb +1 -1
- metadata +30 -47
@@ -8,6 +8,7 @@ module SimpleOracleJDBC
|
|
8
8
|
Date => OracleTypes::DATE,
|
9
9
|
Time => OracleTypes::TIMESTAMP,
|
10
10
|
String => OracleTypes::VARCHAR,
|
11
|
+
# Clob => OracleTypes::VARCHAR,
|
11
12
|
Fixnum => OracleTypes::INTEGER,
|
12
13
|
Integer => OracleTypes::INTEGER,
|
13
14
|
Bignum => OracleTypes::NUMERIC,
|
@@ -98,7 +99,7 @@ module SimpleOracleJDBC
|
|
98
99
|
retrieve_time(obj, i)
|
99
100
|
when 'TIMESTAMP'
|
100
101
|
retrieve_time(obj, i)
|
101
|
-
when 'CHAR', 'VARCHAR2'
|
102
|
+
when 'CHAR', 'VARCHAR2', 'CLOB'
|
102
103
|
retrieve_string(obj, i)
|
103
104
|
else
|
104
105
|
raise UnknownSQLType, obj.get_meta_data.get_column_type_name(i)
|
@@ -150,7 +151,13 @@ module SimpleOracleJDBC
|
|
150
151
|
|
151
152
|
def bind_number(obj, v, i)
|
152
153
|
if v
|
153
|
-
|
154
|
+
# Avoid warning that appeared in JRuby 1.7.3. There are many signatures of
|
155
|
+
# Java::OracleSql::NUMBER and it has to pick one. This causes a warning. This
|
156
|
+
# technique works around the warning and forces it to the the signiture with a
|
157
|
+
# double input - see https://github.com/jruby/jruby/wiki/CallingJavaFromJRuby
|
158
|
+
# under the Constructors section.
|
159
|
+
construct = Java::OracleSql::NUMBER.java_class.constructor(Java::double)
|
160
|
+
obj.set_number(i, construct.new_instance(v))
|
154
161
|
else
|
155
162
|
obj.set_null(i, OracleTypes::NUMBER)
|
156
163
|
end
|
@@ -165,8 +172,7 @@ module SimpleOracleJDBC
|
|
165
172
|
def retrieve_date(obj, i)
|
166
173
|
jdate = obj.get_date(i)
|
167
174
|
if jdate
|
168
|
-
|
169
|
-
Date.new(rt.year, rt.month, rt.day)
|
175
|
+
Date.new(jdate.get_year+1900, jdate.get_month+1, jdate.get_date)
|
170
176
|
else
|
171
177
|
nil
|
172
178
|
end
|
data/test/helper.rb
CHANGED
metadata
CHANGED
@@ -1,79 +1,62 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simpleOracleJDBC
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
4
|
+
version: 0.1.2
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Stephen O'Donnell
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
|
-
description: A lightweight wrapper around the JDBC interface to make it easier to
|
14
|
+
description: A lightweight wrapper around the JDBC interface to make it easier to
|
15
|
+
make SQL and stored procedure calls.
|
15
16
|
email: stephen@betteratoracle.com
|
16
17
|
executables: []
|
17
18
|
extensions: []
|
18
19
|
extra_rdoc_files:
|
19
20
|
- README.md
|
20
21
|
files:
|
21
|
-
-
|
22
|
-
|
23
|
-
-
|
24
|
-
|
25
|
-
-
|
26
|
-
|
27
|
-
-
|
28
|
-
|
29
|
-
-
|
30
|
-
|
31
|
-
-
|
32
|
-
|
33
|
-
-
|
34
|
-
|
35
|
-
-
|
36
|
-
|
37
|
-
- !binary |-
|
38
|
-
bGliL3NpbXBsZV9vcmFjbGVfamRiYy8jYmluZGluZ3MucmIj
|
39
|
-
- !binary |-
|
40
|
-
bGliL3NpbXBsZV9vcmFjbGVfamRiYy9iaW5kaW5ncy5yYg==
|
41
|
-
- !binary |-
|
42
|
-
bGliL3NpbXBsZV9vcmFjbGVfamRiYy9kYl9jYWxsLnJi
|
43
|
-
- !binary |-
|
44
|
-
bGliL3NpbXBsZV9vcmFjbGVfamRiYy9pbnRlcmZhY2UucmI=
|
45
|
-
- !binary |-
|
46
|
-
bGliL3NpbXBsZV9vcmFjbGVfamRiYy9yZXN1bHRfc2V0LnJi
|
47
|
-
- !binary |-
|
48
|
-
bGliL3NpbXBsZV9vcmFjbGVfamRiYy9zcWwucmI=
|
49
|
-
- !binary |-
|
50
|
-
UmFrZWZpbGUucmI=
|
51
|
-
- !binary |-
|
52
|
-
UkVBRE1FLm1k
|
22
|
+
- test/binding_test.rb
|
23
|
+
- test/db_call_test.rb
|
24
|
+
- test/helper.rb
|
25
|
+
- test/interface_test.rb
|
26
|
+
- test/result_set_test.rb
|
27
|
+
- test/sql_test.rb
|
28
|
+
- test/test_runner.rb
|
29
|
+
- lib/simple_oracle_jdbc/#bindings.rb#
|
30
|
+
- lib/simple_oracle_jdbc/bindings.rb
|
31
|
+
- lib/simple_oracle_jdbc/db_call.rb
|
32
|
+
- lib/simple_oracle_jdbc/interface.rb
|
33
|
+
- lib/simple_oracle_jdbc/result_set.rb
|
34
|
+
- lib/simple_oracle_jdbc/sql.rb
|
35
|
+
- lib/simple_oracle_jdbc.rb
|
36
|
+
- Rakefile.rb
|
37
|
+
- README.md
|
53
38
|
homepage: http://betteratoracle.com
|
54
39
|
licenses: []
|
55
|
-
post_install_message:
|
40
|
+
post_install_message:
|
56
41
|
rdoc_options: []
|
57
42
|
require_paths:
|
58
43
|
- lib
|
59
44
|
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
none: false
|
60
46
|
requirements:
|
61
47
|
- - ! '>='
|
62
48
|
- !ruby/object:Gem::Version
|
63
|
-
version:
|
64
|
-
MA==
|
65
|
-
none: false
|
49
|
+
version: '0'
|
66
50
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
67
52
|
requirements:
|
68
53
|
- - ! '>='
|
69
54
|
- !ruby/object:Gem::Version
|
70
|
-
version:
|
71
|
-
MA==
|
72
|
-
none: false
|
55
|
+
version: '0'
|
73
56
|
requirements: []
|
74
|
-
rubyforge_project:
|
75
|
-
rubygems_version: 1.8.
|
76
|
-
signing_key:
|
57
|
+
rubyforge_project:
|
58
|
+
rubygems_version: 1.8.24
|
59
|
+
signing_key:
|
77
60
|
specification_version: 3
|
78
61
|
summary: A gem to simplify JDBC database access to Oracle when using JRuby
|
79
62
|
test_files: []
|