ruby-oci8 1.0.7 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +1254 -390
- data/Makefile +10 -13
- data/README +56 -385
- data/VERSION +1 -1
- data/dist-files +26 -27
- data/ext/oci8/.document +1 -0
- data/ext/oci8/MANIFEST +0 -4
- data/ext/oci8/apiwrap.c.tmpl +172 -0
- data/ext/oci8/apiwrap.h.tmpl +61 -0
- data/ext/oci8/apiwrap.rb +91 -0
- data/ext/oci8/apiwrap.yml +1243 -0
- data/ext/oci8/attr.c +124 -384
- data/ext/oci8/bind.c +472 -164
- data/ext/oci8/encoding.c +196 -0
- data/ext/oci8/env.c +84 -253
- data/ext/oci8/error.c +196 -127
- data/ext/oci8/extconf.rb +82 -59
- data/ext/oci8/lob.c +710 -370
- data/ext/oci8/metadata.c +359 -0
- data/ext/oci8/object.c +622 -0
- data/ext/oci8/oci8.c +577 -161
- data/ext/oci8/oci8.h +354 -258
- data/ext/oci8/oci8lib.c +493 -0
- data/ext/oci8/ocidatetime.c +473 -0
- data/ext/oci8/ocinumber.c +1123 -24
- data/ext/oci8/oraconf.rb +72 -106
- data/ext/oci8/oradate.c +511 -321
- data/ext/oci8/stmt.c +752 -572
- data/ext/oci8/win32.c +131 -0
- data/ext/oci8/xmldb.c +383 -0
- data/lib/.document +2 -0
- data/lib/dbd/OCI8.rb +2 -17
- data/lib/oci8.rb.in +41 -1622
- data/lib/oci8/.document +5 -0
- data/lib/oci8/compat.rb +108 -0
- data/lib/oci8/datetime.rb +489 -0
- data/lib/oci8/encoding-init.rb +40 -0
- data/lib/oci8/encoding.yml +537 -0
- data/lib/oci8/metadata.rb +2077 -0
- data/lib/oci8/object.rb +548 -0
- data/lib/oci8/oci8.rb +773 -0
- data/lib/oci8/oracle_version.rb +144 -0
- data/metaconfig +3 -3
- data/ruby-oci8.gemspec +5 -5
- data/setup.rb +4 -4
- data/test/config.rb +64 -84
- data/test/test_all.rb +14 -21
- data/test/test_array_dml.rb +317 -0
- data/test/test_bind_raw.rb +18 -25
- data/test/test_bind_time.rb +78 -91
- data/test/test_break.rb +37 -35
- data/test/test_clob.rb +33 -89
- data/test/test_connstr.rb +5 -4
- data/test/test_datetime.rb +469 -0
- data/test/test_dbi.rb +99 -60
- data/test/test_dbi_clob.rb +3 -8
- data/test/test_metadata.rb +65 -51
- data/test/test_oci8.rb +151 -55
- data/test/test_oracle_version.rb +70 -0
- data/test/test_oradate.rb +76 -83
- data/test/test_oranumber.rb +405 -71
- data/test/test_rowid.rb +6 -11
- metadata +31 -32
- data/NEWS +0 -420
- data/ext/oci8/const.c +0 -165
- data/ext/oci8/define.c +0 -53
- data/ext/oci8/describe.c +0 -81
- data/ext/oci8/descriptor.c +0 -39
- data/ext/oci8/handle.c +0 -273
- data/ext/oci8/oranumber.c +0 -445
- data/ext/oci8/param.c +0 -37
- data/ext/oci8/server.c +0 -182
- data/ext/oci8/session.c +0 -99
- data/ext/oci8/svcctx.c +0 -238
- data/ruby-oci8.spec +0 -62
- data/support/README +0 -4
- data/support/runit/assert.rb +0 -281
- data/support/runit/cui/testrunner.rb +0 -101
- data/support/runit/error.rb +0 -4
- data/support/runit/method_mappable.rb +0 -20
- data/support/runit/robserver.rb +0 -25
- data/support/runit/setuppable.rb +0 -15
- data/support/runit/teardownable.rb +0 -16
- data/support/runit/testcase.rb +0 -113
- data/support/runit/testfailure.rb +0 -25
- data/support/runit/testresult.rb +0 -121
- data/support/runit/testsuite.rb +0 -43
- data/support/runit/version.rb +0 -3
- data/test/test_describe.rb +0 -137
data/test/test_rowid.rb
CHANGED
@@ -1,16 +1,11 @@
|
|
1
1
|
require 'oci8'
|
2
|
-
require '
|
3
|
-
require 'runit/cui/testrunner'
|
2
|
+
require 'test/unit'
|
4
3
|
require File.dirname(__FILE__) + '/config'
|
5
4
|
|
6
|
-
class TestRowid <
|
5
|
+
class TestRowid < Test::Unit::TestCase
|
7
6
|
|
8
7
|
def setup
|
9
|
-
@conn =
|
10
|
-
end
|
11
|
-
|
12
|
-
def teardown
|
13
|
-
@conn.logoff
|
8
|
+
@conn = get_oci8_connection
|
14
9
|
end
|
15
10
|
|
16
11
|
def test_rowid
|
@@ -31,8 +26,8 @@ EOS
|
|
31
26
|
assert_equal(rid2, rid1)
|
32
27
|
drop_table('test_table')
|
33
28
|
end
|
34
|
-
end # TestRowid
|
35
29
|
|
36
|
-
|
37
|
-
|
30
|
+
def teardown
|
31
|
+
@conn.logoff
|
32
|
+
end
|
38
33
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-oci8
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KUBO Takehiro
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-02-08 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -22,7 +22,6 @@ extensions:
|
|
22
22
|
extra_rdoc_files:
|
23
23
|
- README
|
24
24
|
files:
|
25
|
-
- NEWS
|
26
25
|
- ChangeLog
|
27
26
|
- Makefile
|
28
27
|
- README
|
@@ -30,7 +29,6 @@ files:
|
|
30
29
|
- dist-files
|
31
30
|
- metaconfig
|
32
31
|
- pre-distclean.rb
|
33
|
-
- ruby-oci8.spec
|
34
32
|
- ruby-oci8.gemspec
|
35
33
|
- setup.rb
|
36
34
|
- doc/api.en.html
|
@@ -38,60 +36,61 @@ files:
|
|
38
36
|
- doc/api.ja.html
|
39
37
|
- doc/api.ja.rd
|
40
38
|
- doc/manual.css
|
39
|
+
- ext/oci8/.document
|
41
40
|
- ext/oci8/MANIFEST
|
41
|
+
- ext/oci8/apiwrap.c.tmpl
|
42
|
+
- ext/oci8/apiwrap.h.tmpl
|
43
|
+
- ext/oci8/apiwrap.rb
|
44
|
+
- ext/oci8/apiwrap.yml
|
42
45
|
- ext/oci8/attr.c
|
43
46
|
- ext/oci8/bind.c
|
44
|
-
- ext/oci8/
|
45
|
-
- ext/oci8/define.c
|
46
|
-
- ext/oci8/describe.c
|
47
|
-
- ext/oci8/descriptor.c
|
47
|
+
- ext/oci8/encoding.c
|
48
48
|
- ext/oci8/env.c
|
49
49
|
- ext/oci8/error.c
|
50
50
|
- ext/oci8/extconf.rb
|
51
|
-
- ext/oci8/handle.c
|
52
51
|
- ext/oci8/lob.c
|
52
|
+
- ext/oci8/metadata.c
|
53
53
|
- ext/oci8/oci8.c
|
54
54
|
- ext/oci8/oci8.h
|
55
|
+
- ext/oci8/oci8lib.c
|
56
|
+
- ext/oci8/ocidatetime.c
|
55
57
|
- ext/oci8/ocinumber.c
|
56
58
|
- ext/oci8/oraconf.rb
|
57
59
|
- ext/oci8/oradate.c
|
58
|
-
- ext/oci8/oranumber.c
|
59
|
-
- ext/oci8/param.c
|
60
60
|
- ext/oci8/post-config.rb
|
61
|
-
- ext/oci8/server.c
|
62
|
-
- ext/oci8/session.c
|
63
61
|
- ext/oci8/stmt.c
|
64
|
-
- ext/oci8/
|
62
|
+
- ext/oci8/object.c
|
63
|
+
- ext/oci8/win32.c
|
64
|
+
- ext/oci8/xmldb.c
|
65
|
+
- lib/.document
|
65
66
|
- lib/oci8.rb.in
|
66
67
|
- lib/dbd/OCI8.rb
|
67
|
-
-
|
68
|
-
-
|
69
|
-
-
|
70
|
-
-
|
71
|
-
-
|
72
|
-
-
|
73
|
-
-
|
74
|
-
-
|
75
|
-
-
|
76
|
-
- support/runit/testfailure.rb
|
77
|
-
- support/runit/testresult.rb
|
78
|
-
- support/runit/testsuite.rb
|
79
|
-
- support/runit/version.rb
|
68
|
+
- lib/oci8/.document
|
69
|
+
- lib/oci8/compat.rb
|
70
|
+
- lib/oci8/datetime.rb
|
71
|
+
- lib/oci8/encoding-init.rb
|
72
|
+
- lib/oci8/encoding.yml
|
73
|
+
- lib/oci8/metadata.rb
|
74
|
+
- lib/oci8/object.rb
|
75
|
+
- lib/oci8/oci8.rb
|
76
|
+
- lib/oci8/oracle_version.rb
|
80
77
|
- test/README
|
81
78
|
- test/config.rb
|
82
79
|
- test/test_all.rb
|
80
|
+
- test/test_array_dml.rb
|
83
81
|
- test/test_bind_raw.rb
|
84
82
|
- test/test_bind_time.rb
|
85
83
|
- test/test_break.rb
|
86
84
|
- test/test_clob.rb
|
87
85
|
- test/test_connstr.rb
|
86
|
+
- test/test_datetime.rb
|
88
87
|
- test/test_dbi.rb
|
89
88
|
- test/test_dbi_clob.rb
|
90
|
-
- test/
|
89
|
+
- test/test_metadata.rb
|
91
90
|
- test/test_oci8.rb
|
91
|
+
- test/test_oracle_version.rb
|
92
92
|
- test/test_oradate.rb
|
93
93
|
- test/test_oranumber.rb
|
94
|
-
- test/test_metadata.rb
|
95
94
|
- test/test_rowid.rb
|
96
95
|
has_rdoc: true
|
97
96
|
homepage: http://ruby-oci8.rubyforge.org
|
@@ -105,7 +104,7 @@ require_paths:
|
|
105
104
|
- lib
|
106
105
|
required_ruby_version: !ruby/object:Gem::Requirement
|
107
106
|
requirements:
|
108
|
-
- -
|
107
|
+
- - ">="
|
109
108
|
- !ruby/object:Gem::Version
|
110
109
|
version: 1.8.0
|
111
110
|
version:
|
@@ -118,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
117
|
requirements: []
|
119
118
|
|
120
119
|
rubyforge_project: ruby-oci8
|
121
|
-
rubygems_version: 1.
|
120
|
+
rubygems_version: 1.3.1
|
122
121
|
signing_key:
|
123
122
|
specification_version: 2
|
124
123
|
summary: Ruby interface for Oracle using OCI8 API
|
data/NEWS
DELETED
@@ -1,420 +0,0 @@
|
|
1
|
-
1.0.7:
|
2
|
-
|
3
|
-
* change OCI8::LOB#write to accept an object which is not a String and
|
4
|
-
doesn't respond to 'to_str' as IO#write does.
|
5
|
-
(requested by Christopher Jones)
|
6
|
-
|
7
|
-
* fix oraconf.rb for AIX instant clients.
|
8
|
-
(reported by Kazuya Teramoto)
|
9
|
-
|
10
|
-
* fix oraconf.rb for ruby 1.8.5 with Oracle 8.x which needs some object
|
11
|
-
files to link with.
|
12
|
-
(reported by Jayson Cena)
|
13
|
-
|
14
|
-
1.0.6:
|
15
|
-
|
16
|
-
* fix a problem when compiling for Oracle 8.0.
|
17
|
-
(reported by Axel Reinhold as a ruby-oci8 2.0 issue)
|
18
|
-
|
19
|
-
* [dbi] fix to pass a newly added sanity check in dbi 0.4.1.
|
20
|
-
(reported by Dirk Herzhauser as a ruby-oci8 2.0 issue)
|
21
|
-
|
22
|
-
* [dbi] fix dbh#columns for Oracle 8.1 or lower.
|
23
|
-
The data dictionary all_constraints doesn't have index_name
|
24
|
-
column on Oracle 8i. Rewrite DBI::DBD::OCI8::Database#columns
|
25
|
-
by using all_cons_columns.
|
26
|
-
(backport from ruby-oci8 trunk)
|
27
|
-
|
28
|
-
1.0.5:
|
29
|
-
|
30
|
-
No changes except who try to install on Mac OS X ppc.
|
31
|
-
|
32
|
-
- fix big/little endian checking problem on Mac OS X ppc.
|
33
|
-
(contributed by unknown. See: Bug ID 24284 on rubyforge.)
|
34
|
-
|
35
|
-
1.0.4:
|
36
|
-
|
37
|
-
1. [dbi] support ruby-dbi 0.4
|
38
|
-
(Thanks to James Cao and Peter Zingg.)
|
39
|
-
|
40
|
-
Ruby-dbi 0.4 is supported by DBD::OCI8 after 6 months from the
|
41
|
-
release of 0.4.
|
42
|
-
|
43
|
-
If you are using ruby-dbi 0.1.1, you need to copy dbd/OCI8.rb
|
44
|
-
to DBD/OCI8/OCI8.rb. The file itself works fine with ruby-dbi
|
45
|
-
0.1.1, but the dbi cannot find the file by default.
|
46
|
-
|
47
|
-
2. Rowid column data are fetched as a String by default.
|
48
|
-
|
49
|
-
3. The return type of OCI8::Cursor#rowid is changed from OCIRowid
|
50
|
-
to String.
|
51
|
-
|
52
|
-
Note: It needs one network roundtrip to convert OCIRowid to
|
53
|
-
String on server side when using Oracle 8.x client.
|
54
|
-
On Oracle 9.0 or upper it is converted in the client side.
|
55
|
-
|
56
|
-
4. An exception is raised if a connection is used in a process which is
|
57
|
-
different with a process to establish the connection.
|
58
|
-
|
59
|
-
If you encounter an exception "The connection cannot be reused in the
|
60
|
-
forked process," see the following link.
|
61
|
-
|
62
|
-
http://groups.google.com/group/phusion-passenger/browse_thread/thread/b00d4770bc1d00b8
|
63
|
-
|
64
|
-
5. fix for 11.1.0.7.0 instant rpm package.
|
65
|
-
(reported by Luis Parravicini.)
|
66
|
-
|
67
|
-
The directory tree is a bit different with that of 11.1.0.6.0
|
68
|
-
or earlier.
|
69
|
-
|
70
|
-
6. suppress compilation warnings.
|
71
|
-
(contributed by Daniel Berger)
|
72
|
-
|
73
|
-
1.0.3:
|
74
|
-
|
75
|
-
1. add workaround code for a losing character problem when reading CLOB.
|
76
|
-
(reported by Efren Yevale and Thomas Witt and fixed with Thomas Witt's help.)
|
77
|
-
|
78
|
-
The problem is happened at the following condition.
|
79
|
-
|
80
|
-
(a) Oracle client version is 10.2.0.4 or 11.1.0.6.
|
81
|
-
It doesn't happend when using 10.2.0.3 client or lower.
|
82
|
-
It doesn't depend on Oracle server version.
|
83
|
-
|
84
|
-
(b) The character set is a variable-length one.
|
85
|
-
e.g. AL32UTF8
|
86
|
-
|
87
|
-
2. fix a problem when reading BLOB/CLOB over 1GB.
|
88
|
-
(reported by Jonathan Hadders.)
|
89
|
-
|
90
|
-
3. [rails] fix a problem that OraNumber#to_json returns "{}" when using Rails.
|
91
|
-
(reported by Alex Moore)
|
92
|
-
|
93
|
-
Rails add to_json method. But it doesn't know what OraNumber is.
|
94
|
-
OraNumber#to_json is added for Rails.
|
95
|
-
|
96
|
-
4. [dbi] fix a problem when using Oracle 8i and ruby-dbi.
|
97
|
-
(reported by Glauco Magnelli.)
|
98
|
-
|
99
|
-
1.0.2:
|
100
|
-
|
101
|
-
1. add a gemspec file.
|
102
|
-
(Thanks to Jesse Hu)
|
103
|
-
|
104
|
-
To make a pure ruby gems package:
|
105
|
-
gem build ruby-oci8.gemspec
|
106
|
-
|
107
|
-
To make a binary gems package:
|
108
|
-
gem build ruby-oci8.gemspec -- current
|
109
|
-
|
110
|
-
|
111
|
-
2. [BUG FIX] fix a segv bug in gc mark.
|
112
|
-
(Thanks to authorNari)
|
113
|
-
|
114
|
-
1.0.1:
|
115
|
-
|
116
|
-
1. [SPEC CHANGE] OCI8#exec and OCI8::Cursor#exec's return value is changed
|
117
|
-
for statement except select, insert, update and delete statement.
|
118
|
-
|
119
|
-
It had been true. But now it is the number of rows processed for all
|
120
|
-
non-select statements.
|
121
|
-
|
122
|
-
For example:
|
123
|
-
|
124
|
-
# 1.0.0 or before
|
125
|
-
conn = OCI8.new('user/pass')
|
126
|
-
conn.exec('rename FOO_TABLE to BAR_TABLE') # => true
|
127
|
-
|
128
|
-
# 1.0.1
|
129
|
-
conn = OCI8.new('user/pass')
|
130
|
-
conn.exec('rename FOO_TABLE to BAR_TABLE') # => 0
|
131
|
-
|
132
|
-
2. fix a bug that OraDate.new made a core dump on x86_64 linux.
|
133
|
-
(reported by Alun Eyre)
|
134
|
-
|
135
|
-
3. fix OCI8#non_blocking = false problem.
|
136
|
-
Once the connection became non-bocking mode, it could
|
137
|
-
not be reset to blocking mode. Now it can be reset.
|
138
|
-
(reported by Cagdas Gerede)
|
139
|
-
|
140
|
-
4. support cursors in a result set.
|
141
|
-
(contributed by Randy Gordon)
|
142
|
-
|
143
|
-
For example:
|
144
|
-
conn = OCI8.new('ruby/oci8')
|
145
|
-
sql = 'SELECT CURSOR(SELECT * FROM foo where foo.c1 = bar.c1 ) FROM bar'
|
146
|
-
conn.exec(sql) do |row|
|
147
|
-
cursor_in_result_set = row[0]
|
148
|
-
cursor_in_result_set.fetch do |row|
|
149
|
-
puts row.join(',')
|
150
|
-
end
|
151
|
-
end
|
152
|
-
|
153
|
-
5. fix oraconf.rb for official x86_64 linux rpms.
|
154
|
-
(contributed by Pat)
|
155
|
-
|
156
|
-
1.0.0:
|
157
|
-
|
158
|
-
1. fix a BUG when binding a Bignum. This bug was added in
|
159
|
-
ruby-oci8 1.0.0-rc2. (reported by Daniel Berger)
|
160
|
-
|
161
|
-
2. add OCI8#describe_table(table_name), OCI8::Cursor#column_metadata,
|
162
|
-
OCI8::Metadata::Table, OCI8::Metadata::View and OCI8::Metadata::Column.
|
163
|
-
|
164
|
-
table information:
|
165
|
-
con = OCI8.new('username/password')
|
166
|
-
table_info = con.describe_table('table_name') #=> OCI8::Metadata::Table
|
167
|
-
table_info.columns #=> an array of OCI8::Metadata::Column.
|
168
|
-
|
169
|
-
query information:
|
170
|
-
con = OCI8.new('username/password')
|
171
|
-
csr = con.exec('select * from table_name')
|
172
|
-
csr.column_metadata #=> an array of OCI8::Metadata::Column.
|
173
|
-
|
174
|
-
5. add OCI8::BindType::BinaryDouble if oci8lib.so is compiled for
|
175
|
-
Oracle 10g client. You can fetch exactly same values in Oracle.
|
176
|
-
|
177
|
-
You could fetch the values in previous version by adding the
|
178
|
-
following line.
|
179
|
-
|
180
|
-
OCI8::BindType::Mapping[101] = OCI8::BindType::Float
|
181
|
-
(This is default in ruby-oci8 1.0.0-rc2.)
|
182
|
-
|
183
|
-
But a fetched value may not be exactly same with the value in
|
184
|
-
Oracle. That's because OCI8::BindType::Float's network
|
185
|
-
representation is Oracle NUMBER data type. A BINARY_DOUBLE
|
186
|
-
value in Oracle become NUMBER on the network and is converted
|
187
|
-
to Float on the client side. It makes a bit difference by
|
188
|
-
round-off error.
|
189
|
-
|
190
|
-
In addition, Oracle NUMBER doesn't have NaN, +Infinity and -Infinity.
|
191
|
-
You cannot fetch the values by older versions.
|
192
|
-
|
193
|
-
Note: When you bind a Float value, it is bound by
|
194
|
-
OCI8::BindType::Float by default. You have two ways to bind
|
195
|
-
it by OCI8::BindType::BinaryDouble.
|
196
|
-
|
197
|
-
a. bind explicitly.
|
198
|
-
|
199
|
-
con = OCI8.new('ruby/oci8')
|
200
|
-
csr = con.parse('insert into table_name values (:1)')
|
201
|
-
csr.bind_param(1, 10.5, OCI8::SQLT_IBDOUBLE)
|
202
|
-
csr.exec
|
203
|
-
|
204
|
-
b. change the default behaviour if and only if you are sure that
|
205
|
-
the Oracle client version and Oracle server version are both
|
206
|
-
10g or upper.
|
207
|
-
|
208
|
-
# use OCI8::BindType::BinaryDouble for ruby's Float values.
|
209
|
-
OCI8::BindType::Mapping[Float] = OCI8::BindType::BinaryDouble
|
210
|
-
con = OCI8.new('ruby/oci8')
|
211
|
-
csr = con.exec('insert into table_name values (:1)', 10.5)
|
212
|
-
|
213
|
-
4. OCI8::Cursor#fetch_hash accepts a block as a iterator.
|
214
|
-
|
215
|
-
5. [dbi] support external OS authentication.
|
216
|
-
(contributed by Dan Fitch)
|
217
|
-
|
218
|
-
dbh = DBI.connect('dbi:OCI8', nil, nil)
|
219
|
-
|
220
|
-
6. [dbi] add DatabaseHandle#columns and improve StatementHandle#column_info
|
221
|
-
(suggested by Venkat Pa)
|
222
|
-
|
223
|
-
7. [bug] fix a problem when binding ''(empty string) via dbi.
|
224
|
-
|
225
|
-
1.0.0-rc3:
|
226
|
-
|
227
|
-
1. support external OS authentication.
|
228
|
-
(suggested by Dan Fitch)
|
229
|
-
|
230
|
-
conn = OCI8.new('/')
|
231
|
-
or
|
232
|
-
conn = OCI8.new(nil, nil)
|
233
|
-
|
234
|
-
2. incompatible change on connect string.
|
235
|
-
|
236
|
-
You need to pass only one argument to OCI8.new to parse the
|
237
|
-
first argument as a SQL*Plus-like connect string.
|
238
|
-
|
239
|
-
For example, OCI8.new('scott/tiger', nil) was parsed as the
|
240
|
-
username is 'scott' and the password is 'tiger' in 1.0.0-rc2.
|
241
|
-
But from now on, it is treated as the username is 'scott/tiger'
|
242
|
-
and the password is nil because it has two arguments. You need
|
243
|
-
to use OCI8.new('scott/tiger') instead.
|
244
|
-
|
245
|
-
3. fix NCLOB support on Oracle 9i.
|
246
|
-
(reported by Matthew Noble)
|
247
|
-
|
248
|
-
1.0.0-rc2's NCLOB support worked on Oracle 10g only.
|
249
|
-
|
250
|
-
4. fix a problem to compile with a third-party x86_64 rpm package.
|
251
|
-
(contributed by Jeff Abbott)
|
252
|
-
|
253
|
-
The x86_64 source rpm packages are found on the following URLs.
|
254
|
-
http://freshrpms.net/docs/oracle/
|
255
|
-
http://remi.collet.free.fr/index.php?2007/01/22/279-oracle-instant-client-10203-on-x86_64
|
256
|
-
|
257
|
-
5. '--with-instant-client' option become obsolete and is ignored.
|
258
|
-
|
259
|
-
Use LD_LIBRARY_PATH(Linux), PATH(Windows), etc. to indicate
|
260
|
-
the instant client's location.
|
261
|
-
|
262
|
-
6. fix some other minor problems.
|
263
|
-
|
264
|
-
1.0.0-rc2:
|
265
|
-
|
266
|
-
1. support SQL*Plus-like connect strings.
|
267
|
-
(contributed by Oracle Corporation)
|
268
|
-
|
269
|
-
require 'oci8'
|
270
|
-
conn = OCI8.new('username/password@tns_name')
|
271
|
-
# instead of OCI8.new('username', 'password', 'tns_name')
|
272
|
-
|
273
|
-
2. Add a rpm spec file.
|
274
|
-
(contributed by Brian Candler)
|
275
|
-
|
276
|
-
rpmbuild -tb ruby-oci8-x.y.z.tar.gz
|
277
|
-
|
278
|
-
/usr/src/redhat/RPMS/i386/ruby-oci8-x.y.z-1.i386.rpm
|
279
|
-
|
280
|
-
3. support BINARY_FLOAT and BINADY_DOUBLE columns.
|
281
|
-
(This problem is reported by Duncan McCaffery.)
|
282
|
-
|
283
|
-
4. support NCLOB columns.
|
284
|
-
(This problem is reported by Dmitry Zadvornykh.)
|
285
|
-
|
286
|
-
cursor = conn.exec('select nclob_column from nclob_table')
|
287
|
-
cursor.fetch # => [ instance of OCI8::NCLOB ]
|
288
|
-
|
289
|
-
5. add new CLOB/NCLOB/BLOB insert method.
|
290
|
-
(This is available on Oracle 8.1.5 or later.)
|
291
|
-
|
292
|
-
cursor = conn.parse("INSERT INTO clob_table VALUES (:1)")
|
293
|
-
cursor.bind_param(1, OCI8::CLOB.new(conn, lob_data))
|
294
|
-
cursor.exec
|
295
|
-
|
296
|
-
cursor = conn.parse("INSERT INTO nclob_table VALUES (:1)")
|
297
|
-
cursor.exec(OCI8::NCLOB.new(conn, lob_data))
|
298
|
-
|
299
|
-
conn.exec("INSERT INTO blob_table VALUES (:1)",
|
300
|
-
OCI8::BLOB.new(conn, lob_data))
|
301
|
-
|
302
|
-
This is added to insert CLOB as a SDO_GEOMETRY's parameter
|
303
|
-
to solve a problem reported by Pete Schwamb.
|
304
|
-
|
305
|
-
6. add an error location in C code to OCIException's backtrace.
|
306
|
-
This is for debug information.
|
307
|
-
|
308
|
-
1.0.0-rc1:
|
309
|
-
|
310
|
-
1. support BFILE columns.
|
311
|
-
|
312
|
-
2. check whether Full Client or Instant Client by checking load library
|
313
|
-
path on configuration to compile.
|
314
|
-
|
315
|
-
3. raise an OCIError with "OCI Library Initialization Error" message if
|
316
|
-
no message can not be retrieved when requiring oci8lib.so.
|
317
|
-
|
318
|
-
4. raise "OCI Library Initialization Error" when first connect instead
|
319
|
-
of requiring oci8lib.so. This is a workaround to prevent Rails from
|
320
|
-
being stopped on invalid Oracle environment.
|
321
|
-
|
322
|
-
0.1.16:
|
323
|
-
|
324
|
-
1. Add LONG and LONG RAW support longer than 65535 bytes.
|
325
|
-
|
326
|
-
Use OCI8#long_read_len and OCI8#long_read_len= to set max long length.
|
327
|
-
The default value is 65535.
|
328
|
-
|
329
|
-
2. OraDate and OraNumber can be serialized by Marshal now.
|
330
|
-
|
331
|
-
3. OraDate and OraNumber can be serialized by YAML now.
|
332
|
-
|
333
|
-
4. Fix bug on OraDate#dup, OraDate#clone, OraNumber#dup and OraNumber#clone.
|
334
|
-
(reported by Daniel Berger.)
|
335
|
-
|
336
|
-
These methods had not duplicated their contents, which caused segmentation
|
337
|
-
fault. Now they duplicate their contents also by adding initialize_copy
|
338
|
-
method.
|
339
|
-
|
340
|
-
5. Add a workaround code on cygwin environment variables problem.
|
341
|
-
|
342
|
-
Cygwin manages environment variables by itself. They don't synchroize
|
343
|
-
with Win32's ones. When setting Oracle's environment variables, they
|
344
|
-
are set to cygwin's environment. But Oracle client library read
|
345
|
-
Win32's. Now Oracle-related variables are forcedly set to Win32.
|
346
|
-
|
347
|
-
6. Accept all Fixnum values when binding as a Fixnum on 64-bit ruby.
|
348
|
-
|
349
|
-
A Fixnum is a 31-bit integer on 32-bit ruby, 63-bit integer on 64-bit
|
350
|
-
ruby. But it had been bound to 32-bit integer on ruby-oci8. Now it is
|
351
|
-
bound to integer whose bit width is same with ruby.
|
352
|
-
|
353
|
-
0.1.15:
|
354
|
-
|
355
|
-
1. no new features. :-<
|
356
|
-
|
357
|
-
2. suppress memory usage when binding a placeholder which is already bound.
|
358
|
-
|
359
|
-
require 'oci8'
|
360
|
-
conn = OCI8.new('ruby', 'oci8')
|
361
|
-
cursor = conn.parse('select * from foo where key = :key')
|
362
|
-
0.upto(10000) do |key|
|
363
|
-
# bind values had not freed until cursor.close.
|
364
|
-
# Now they are freed when GC is run.
|
365
|
-
cursor.bind_param('key', key)
|
366
|
-
cursor.exec
|
367
|
-
.... fetch ....
|
368
|
-
end
|
369
|
-
|
370
|
-
3. fix potentially segmentation fault while exiting process.
|
371
|
-
When exiting process, ruby's objects are GCed with unexpectable
|
372
|
-
order. If an OCIEnv instance was GCed in prior to OCIRowid objects,
|
373
|
-
it caused segmentation fault.
|
374
|
-
|
375
|
-
4. add a workaround code when setting $0.
|
376
|
-
The following code made enviroment variables empty strings on
|
377
|
-
Unix when using ruby 1.8.4, ruby-oci8 0.1.14 and Oracle 10.1.0.
|
378
|
-
(Oracle 10.2.0 and ruby 1.8.2 doesn't have this problem.)
|
379
|
-
|
380
|
-
require 'oci8'
|
381
|
-
ENV['HOME'] # --> valid value
|
382
|
-
$0 = 'foo'
|
383
|
-
ENV['HOME'] # --> ''
|
384
|
-
|
385
|
-
5. fix registry search path on compilation.
|
386
|
-
(OracleXE Windows version)
|
387
|
-
|
388
|
-
0.1.14:
|
389
|
-
|
390
|
-
1. add OCI8#prefetch_rows=.
|
391
|
-
|
392
|
-
This specifies the number of rows in a single round trip.
|
393
|
-
See: http://www.easysoft.com/products/data_access/odbc_oracle_driver/performance_tuning_guide.html#multiple_rows
|
394
|
-
In addition, setting zero may become a workaround
|
395
|
-
of some Oracle internal problems.
|
396
|
-
The default value is one.
|
397
|
-
|
398
|
-
2. fix bug when binding a Bignum.
|
399
|
-
3. (low-level API) add attrSet(OCI_ATTR_DESC_PUBLIC, -1).
|
400
|
-
4. (low-level API) add a constant OCI_PTYPE_UNK.
|
401
|
-
5. (internal) use OCIEnv.logon when no priviledge login.
|
402
|
-
6. (internal) delete code to register malloc/realloc/free callbacks to OCI.
|
403
|
-
|
404
|
-
0.1.13:
|
405
|
-
|
406
|
-
1. fix a memory leak.
|
407
|
-
(fixed by Nathaniel Talbott.)
|
408
|
-
|
409
|
-
It is recommended to update to 0.1.13 if a program executes many
|
410
|
-
queries. That's bacause 0.1.12 cause 70-byte memory leak per a
|
411
|
-
query.
|
412
|
-
|
413
|
-
2. ruby's DateTime support is added.
|
414
|
-
(suggested by Daniel Berger.)
|
415
|
-
|
416
|
-
To fetch Oracle's DATE datatype as ruby's DateTime by default, add
|
417
|
-
the following code to your program.
|
418
|
-
|
419
|
-
OCI8::BindType::Mapping[OCI8::SQLT_DAT] = OCI8::BindType::DateTime
|
420
|
-
OCI8::BindType::Mapping[OCI8::SQLT_TIMESTAMP] = OCI8::BindType::DateTime
|