ruby-oci8 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.yardopts ADDED
@@ -0,0 +1,13 @@
1
+ --protected
2
+ --no-private
3
+ --exclude ext/oci8/apiwrap.rb
4
+ --exclude ext/oci8/oraconf.rb
5
+ --exclude lib/oci8/compat.rb
6
+ --exclude lib/dbd
7
+ -
8
+ NEWS
9
+ docs/install-full-client.md
10
+ docs/install-instant-client.md
11
+ docs/install-binary-package.md
12
+ docs/platform-specific-issues.md
13
+ docs/report-installation-issue.md
data/ChangeLog CHANGED
@@ -1,3 +1,107 @@
1
+ 2012-04-22 KUBO Takehiro <kubo@jiubao.org>
2
+ * VERSION: update to 2.1.1.
3
+ * README.md: add links.
4
+
5
+ 2012-04-22 KUBO Takehiro <kubo@jiubao.org>
6
+ * NEWS: add changes between 2.1.0 and 2.1.1.
7
+ * README -> README.md: renamed.
8
+ * .yardopts: added for yard.
9
+ * docs/install-binary-package.md, docs/report-installation-issue.md:
10
+ added.
11
+ * docs/platform-specific-issues.md, lib/oci8/bindtype.rb, lib/oci8/connection_pool.rb
12
+ lib/oci8/object.rb, lib/oci8/properties.rb: fix documents.
13
+ * ruby-oci8.gemspec, dist-files: fix for renamed and added files.
14
+
15
+ 2012-04-21 KUBO Takehiro <kubo@jiubao.org>
16
+ * test/test_datetime.rb: fix to pass tests on ruby 1.9.1 and earlier.
17
+
18
+ 2012-04-21 KUBO Takehiro <kubo@jiubao.org>
19
+ * ext/oci8/oci8.c: fix to raise a RuntimeError when a connection
20
+ retrieved from a connection pool is set as non-blocking on
21
+ ruby 1.8.
22
+
23
+ 2012-04-21 KUBO Takehiro <kubo@jiubao.org>
24
+ * ext/oci8/lob.c: OCI8::LOB#read() returns an empty string '' when
25
+ it is an empty lob.
26
+
27
+ 2012-04-21 KUBO Takehiro <kubo@jiubao.org>
28
+ * custom-rdoc.rb: delete an unused file.
29
+
30
+ 2012-04-21 KUBO Takehiro <kubo@jiubao.org>
31
+ * test/test_oci8.rb: fix code to test OCI8::CLOB.new(conn, '').
32
+
33
+ 2012-04-17 KUBO Takehiro <kubo@jiubao.org>
34
+ * ext/oci8/lob.c: 1. fix an exception when OCI8::CLOB.new(conn, '')
35
+ is called. 2. Reset the position of a newly created LOB.
36
+
37
+ 2012-04-17 KUBO Takehiro <kubo@jiubao.org>
38
+ * ext/oci8/oci8lib.c: fix core dump.
39
+ See: https://github.com/kubo/ruby-oci8/issues/11
40
+ (reported by Raimonds Simanovskis)
41
+
42
+ 2012-04-08 KUBO Takehiro <kubo@jiubao.org>
43
+ * ext/oci8/lob.c, ext/oci8/win32.c, lib/oci8/oracle_version.rb:
44
+ revise rdoc comments.
45
+
46
+ 2012-04-06 KUBO Takehiro <kubo@jiubao.org>
47
+ * ext/oci8/error.c, ext/oci8/ocihandle.c, ext/oci8/oradate.c,
48
+ lib/oci8/encoding-init.rb, lib/oci8/oci8.rb, lib/oci8/ocihandle.rb:
49
+ revise rdoc comments.
50
+
51
+ 2012-04-05 KUBO Takehiro <kubo@jiubao.org>
52
+ * ext/oci8/ocinumber.c, lib/oci8/oci8.rb: revise OraNumber's comments.
53
+
54
+ 2012-04-03 KUBO Takehiro <kubo@jiubao.org>
55
+ * ext/oci8/oci8.h, ext/oci8/ocinumber.c: change OCI8::Math::*'s comments
56
+ for yard.
57
+
58
+ 2012-04-02 KUBO Takehiro <kubo@jiubao.org>
59
+ * NEWS: change the text format to markdown.
60
+
61
+ 2012-03-18 KUBO Takehiro <kubo@jiubao.org>
62
+ * test/test_datetime.rb: fix testcase failures in DST.
63
+ (reported by Yasuo Honda)
64
+
65
+ 2012-03-11 KUBO Takehiro <kubo@jiubao.org>
66
+ * dist-files, docs/install-full-client.md, docs/install-instant-client.md,
67
+ docs/platform-specific-issues.md: add and fix documents.
68
+
69
+ 2012-03-11 KUBO Takehiro <kubo@jiubao.org>
70
+ * ruby-oci8.gemspec: fix warning: string literal in condition.
71
+ (pointed by andynu at github)
72
+
73
+ 2012-01-22 KUBO Takehiro <kubo@jiubao.org>
74
+ * ext/oci8/ocinumber.c: Use isnan() and isinf() instead of fpclassify()
75
+ for platforms which don't have fpclassify().
76
+ (reported by John Beckwith)
77
+
78
+ 2012-01-19 KUBO Takehiro <kubo@jiubao.org>
79
+ * ext/oci8/extconf.rb, pre-distclean.rb, ruby-oci8.gemspec: create map files
80
+ of oci8lib_*.so on mingw32 in case of analyzing a core (minidump) file.
81
+
82
+ 2012-01-19 KUBO Takehiro <kubo@jiubao.org>
83
+ * ext/oci8/apiwrap.yml, ext/oci8/stmt.c, lib/oci8/oci8.rb,
84
+ lib/oci8/properties.rb: enable statement caching per session in OCI layer
85
+ if the Oracle client is 9iR2 or upper.
86
+
87
+ 2012-01-19 KUBO Takehiro <kubo@jiubao.org>
88
+ * ext/oci8/apiwrap.yml, ext/oci8/oci8.c, lib/oci8/oci8.rb: replace
89
+ OCILogon() with OCILogon2() and use the latter to use
90
+ ConnectionPool.
91
+ * test/config.rb: fix to pass lob tests.
92
+
93
+ 2012-01-09 KUBO Takehiro <kubo@jiubao.org>
94
+ * docs/install-full-client.md: add a new document file.
95
+
96
+ 2012-01-08 KUBO Takehiro <kubo@jiubao.org>
97
+ * doc/*: remove obsolete documents.
98
+
99
+ 2011-12-15 KUBO Takehiro <kubo@jiubao.org>
100
+ * lib/oci8/object.rb, test/setup_test_object.sql, test/test_object.rb:
101
+ fix "wrong number of arguments (1 for 2)" when date datatype in a object
102
+ type is gotten.
103
+ (repored by Leoš Bitto)
104
+
1
105
  2011-12-13 KUBO Takehiro <kubo@jiubao.org>
2
106
  * VERSION: update to 2.1.0.
3
107
  * ext/oci8/error.c, ext/oci8/oci8.c, ext/oci8/oci8.h, ext/oci8/ocidatetime.c,
data/NEWS CHANGED
@@ -1,414 +1,516 @@
1
- 2.1.0:
1
+ # @markup markdown
2
2
 
3
- *** Ruby-oci8 2.1.0 doesn't support Oracle 8 (8.0) and Oracle 8i (8.1) anymore. ***
3
+ 2.1.1
4
+ =====
4
5
 
5
- * New Features
6
+ New Features
7
+ ------------
6
8
 
7
- - OCI connection pooling
9
+ ### Statement caching in OCI
8
10
 
9
- See: http://docs.oracle.com/cd/E11882_01/appdev.112/e10646/oci09adv.htm#sthref1479
10
- and http://docs.oracle.com/cd/E11882_01/java.112/e16548/ociconpl.htm#JJDBC28789
11
+ See {http://docs.oracle.com/cd/E11882_01/appdev.112/e10646/oci09adv.htm#i471377}.
12
+ This feature is enabled only when the Oracle client is 9iR2 or upper.
11
13
 
12
- Example:
14
+ The default cache size is 20. It can be changed as follows.
13
15
 
14
- # Create a connection pool.
15
- # username and password are required to establish an implicit primary session.
16
- cpool = OCI8::ConnectionPool.new(1, 5, 2, username, password, database)
16
+ # change the size to 100.
17
+ OCI8.properties[:statement_cache_size] = 100
17
18
 
18
- # Get a session from the pool.
19
- # Pass the connection pool to the third argument.
20
- conn1 = OCI8.new(username, password, cpool)
19
+ Specification changes
20
+ ---------------------
21
21
 
22
- # Get another session.
23
- conn2 = OCI8.new(username, password, cpool)
22
+ ### OCI8::LOB#read() returns an empty string '' when it is an empty lob.
24
23
 
25
- - Daylight saving time aware if TZ is set.
24
+ It had been returned nil.
25
+
26
+ Fixed Issues
27
+ ------------
28
+
29
+ - OCI8::CLOB.new(conn, '') works now.
30
+
31
+ - fix core dump when calling PL/SQL procedure with cursor argument.
32
+ See: {https://github.com/kubo/ruby-oci8/issues/11}
33
+
34
+ (reported by Raimonds Simanovskis)
35
+
36
+ - fix testcase failures in DST.
37
+ See: {https://github.com/kubo/ruby-oci8/issues/8}
26
38
 
27
- You should set the environment variable TZ if your applications run
28
- in a time zone with daylight saving time transitions.
29
- Otherwise, Oracle session time zone is set with current constant
30
- offset from GMT.
31
39
  (reported by Yasuo Honda)
32
40
 
33
- - connect as sysasm (Oracle 11g only)
41
+ - fix a compilation issue on Redhat.
34
42
 
35
- OCI8.new('username/password as sysasm')
36
- or
37
- OCI8.new('username', 'password', nil, :SYSASM)
43
+ (reported by John Beckwith and others)
44
+
45
+ - fix "wrong number of arguments (1 for 2)" when a date member in a object type is accessed.
46
+
47
+ (repored by Leoš Bitto)
48
+
49
+ 2.1.0
50
+ =====
51
+
52
+ New Features
53
+ ------------
54
+
55
+ ### OCI connection pooling
56
+
57
+ See: {OCI8::ConnectionPool}
58
+
59
+ ### Daylight saving time aware if TZ is set.
60
+
61
+ You should set the environment variable TZ if your applications run
62
+ in a time zone with daylight saving time transitions.
63
+ Otherwise, Oracle session time zone is set with current constant
64
+ offset from GMT.
65
+ (reported by Yasuo Honda)
66
+
67
+ ### connect as sysasm (Oracle 11g only)
38
68
 
39
- - Oracle number is converted to ruby float exactly same as ruby does.
69
+ You can connect to the Oracle server as SYSASM privilege as follows:
40
70
 
41
- From ruby 1.9.2, a float value converted from Oracle number 15.7 by
42
- the Oracle function OCINumberToReal() makes a string representation
43
- 15.700000000000001 by Float#to_s. (See: http://redmine.ruby-lang.org/issues/4656)
44
- To avoid this issue, any Oracle number is converted to a float as
45
- ruby's String#to_f does.
71
+ OCI8.new('username/password as sysasm')
46
72
 
47
- The behavior is customizable by OCI8.properties[:float_conversion_type].
73
+ or
48
74
 
49
- OCI8.properties[:float_conversion_type] = :oracle # => Use OCINumberToReal()
50
- OCI8.properties[:float_conversion_type] = :ruby # => Use String#to_f
75
+ OCI8.new('username', 'password', nil, :SYSASM)
51
76
 
52
- The default value is :ruby.
77
+ ### Oracle number is converted to ruby float exactly same as ruby does.
53
78
 
54
- - OCI_SUCCESS_WITH_INFO handling is changed.
79
+ From ruby 1.9.2, a float value converted from Oracle number 15.7 by
80
+ the Oracle function OCINumberToReal() makes a string representation
81
+ 15.700000000000001 by `Float#to_s`. (See: {http://redmine.ruby-lang.org/issues/4656})
82
+ To avoid this issue, any Oracle number is converted to a float as
83
+ ruby's `String#to_f` does.
55
84
 
56
- Ruby-oci8 2.0 treats OCI_SUCCESS_WITH_INFO in OCI layer as an error
57
- and raise an exception OCISuccessWithInfo such as "ORA-24347: Warning of
58
- a NULL column in an aggregate function" and "ORA-28002: the password will
59
- expire within xx days."
85
+ The behavior is customizable by {OCI8.properties OCI8.properties[:float\_conversion\_type]}.
60
86
 
61
- From 2.1.0, it is treated as a warning and the exception is set
62
- to OCI8#last_error.
87
+ OCI8.properties[:float_conversion_type] = :oracle # => Use OCINumberToReal()
88
+ OCI8.properties[:float_conversion_type] = :ruby # => Use String#to_f
63
89
 
64
- - OCI8#last_error
90
+ The default value is :ruby.
65
91
 
66
- The last error or warning associated with the session is set to
67
- OCI8#last_error. The usecase is to detect OCI_SUCCESS_WITH_INFO.
68
- It is reset by OCI8#exec and OCI8#parse.
92
+ ### `OCISuccessWithInfo` exceptions are not raised any more.
69
93
 
70
- - Experimental support of character length semantics
94
+ Ruby-oci8 2.0 treats `OCI_SUCCESS_WITH_INFO` in OCI layer as an error
95
+ and raise an exception {OCISuccessWithInfo} such as "ORA-24347: Warning of
96
+ a NULL column in an aggregate function" and "ORA-28002: the password will
97
+ expire within xx days."
71
98
 
72
- This is enabled when :char is set to OCI8.properties[:length_semantics].
99
+ From 2.1.0, it is treated as a warning and the exception is set
100
+ to {OCI8#last_error}.
73
101
 
74
- - OCI8.client_charset_name and OCI8#database_charset_name is added.
102
+ ### {OCI8#last_error} is added.
75
103
 
76
- They return Oracle charset name such as WE8ISO8859P15.
104
+ The last error or warning associated with the session is set to
105
+ {OCI8#last_error}. The usecase is to detect {OCISuccessWithInfo}.
106
+ It is reset by {OCI8#exec} and {OCI8#parse}.
77
107
 
78
- * Specification changes
108
+ ### Experimental support of character length semantics
79
109
 
80
- - The parent class OCINoData was changed from OCIException to OCIError.
110
+ {OCI8.properties OCI8.properties[:length\_semantics]} indicates length semantics
111
+ of {OCI8::Cursor#bind\_param}. When it is `:char`, the length is counted by the
112
+ number of characters. When it is `:byte`, it is counted by the number of
113
+ bytes.
81
114
 
82
- * Fixed Issues
115
+ ### {OCI8.client\_charset\_name} and {OCI8#database\_charset\_name} are added.
83
116
 
84
- - Fix a bug that an array is always bound as null.
117
+ They return Oracle charset name such as WE8ISO8859P15.
118
+
119
+ Specification changes
120
+ ---------------------
121
+
122
+ ### The parent class {OCINoData} was changed from {OCIException} to {OCIError}.
123
+
124
+ ### Oracle 8 and Oracie 8i is not supported anymore.
125
+
126
+ Fixed Issues
127
+ ------------
128
+
129
+ - Fix a bug that an array is always bound as null.
85
130
  This bug was introduced in ruby-oci8 2.0.5.
131
+
86
132
  (reported by Leoš Bitto)
87
133
 
88
- - Avoid a gcc internal compiler error when using ruby1.9.2-p290 on
89
- ubuntu 11.10 (64bit). (reported by Bob Saveland.)
134
+ - Avoid a gcc internal compiler error when using ruby1.9.2-p290 on
135
+ ubuntu 11.10 (64bit).
136
+
137
+ (reported by Bob Saveland.)
138
+
139
+ - Fix compilation problems on Solaris.
90
140
 
91
- - Fix compilation problems on Solaris.
92
141
  (Reported by Sanjiv Patel.)
93
142
 
94
- - Fix compilation problems on Linux.
143
+ - Fix compilation problems on Linux.
144
+
95
145
  (Reported by Edgars Beigarts.)
96
146
 
97
- - Connections are released by GC without explicit logoff.
147
+ - Connections are released by GC without explicit logoff.
98
148
 
99
- - Set ruby encoding CP950 for oracle characterset ZHT16MSWIN950 and
149
+ - Set ruby encoding CP950 for oracle characterset ZHT16MSWIN950 and
100
150
  CP951 for ZHT16HKSCS and ZHT16HKSCS31 when the ruby is 1.9.3.
101
151
 
102
- - Clear an executuing thread information in a connection when a SQL
152
+ - Clear an executuing thread information in a connection when a SQL
103
153
  executions is canceled by Thread#kill or Timeout::timeout.
154
+
104
155
  (reported by Aaron Qian)
105
156
 
106
- - Fix some test cases for object type and TZ issues.
157
+ - Fix some test cases for object type and TZ issues.
158
+
107
159
  (reported by Yasuo Honda)
108
160
 
109
- - Use Gem::Command.build_args to get arguments after '--'.
161
+ - Use Gem::Command.build_args to get arguments after '--'.
162
+
110
163
  (reported by jbirdjavi)
111
164
 
112
- 2.0.6:
165
+ 2.0.6
166
+ =====
113
167
 
114
- * Fixed issues
168
+ Fixed issues
169
+ ------------
115
170
 
116
- - fix SEGV when freeing a temporary LOB during GC on rubinius 1.2.3.
171
+ - fix SEGV when freeing a temporary LOB during GC on rubinius 1.2.3.
117
172
 
118
- - revert the exception type from RuntimeError to OCIException when
173
+ - revert the exception type from RuntimeError to OCIException when
119
174
  a closed OCI handle's method is called. It was chaned in 2.0.5
120
175
  by mistake.
121
176
 
122
- 2.0.5:
177
+ 2.0.5
178
+ =====
179
+
180
+ New Features
181
+ ------------
182
+
183
+ ### Support Rubinius.
184
+
185
+ ### {OraNumber#has\_decimal\_part?} is added.
186
+
187
+ Example:
123
188
 
124
- * New Features
189
+ OraNumber(10).has_decimal_part? # => false
190
+ OraNumber(10.1).has_decimal_part? # => true
125
191
 
126
- - Support Rubinius.
192
+ ### Limitted support for OraNumber's positive and negative infinity.
127
193
 
128
- - OraNumber#has_decimal_part? -> boolean
194
+ They are converted to '~' and '-~' respectively as described in
195
+ {http://www.ixora.com.au/notes/infinity.htm}.
129
196
 
130
- OraNumber(10).has_decimal_part? # => false
131
- OraNumber(10.1).has_decimal_part? # => true
197
+ ### {OCI8.properties} is added to control ruby-oci8 behaviour.
132
198
 
133
- - Limitted support for OraNumber's positive and negative infinity.
199
+ It supports :bind_string_as_nchar only for now.
134
200
 
135
- They are converted to '~' and '-~' respectively as described in
136
- <URL:http://www.ixora.com.au/notes/infinity.htm>.
201
+ ### {OCI8.properties}[:bind\_string\_as\_nchar] is added.
137
202
 
138
- - OCI8.properties is added to control ruby-oci8 behaviour.
139
- It supports :bind_string_as_nchar only for now.
203
+ You need to set "`OCI8.properties[:bind_string_as_nchar] = true`"
204
+ if the database character set is not UTF-8 and 'NCHAR'/'NVARCHAR2' columns
205
+ contain characters which cannot be converted to the database character set.
140
206
 
141
- - OCI8.properties[:bind_string_as_nchar] is added.
207
+ See: {http://rubyforge.org/forum/forum.php?thread\_id=48838&forum\_id=1078}
142
208
 
143
- You need to set "OCI8.properties[:bind_string_as_nchar] = true"
144
- if the database character set is not UTF-8 and NCHAR/NVARCHAR2 columns
145
- contain characters which cannot be converted to the database character set.
146
- See: http://rubyforge.org/forum/forum.php?thread_id=48838&forum_id=1078
209
+ Fixed issues
210
+ ------------
147
211
 
148
- * Fixed issues
212
+ - Fix InvalidHandle errors on Rails.
149
213
 
150
- - Fix InvalidHandle errors on Rails.
151
214
  (reported by Jordan Curzon and Aaron Qian)
152
- See: http://rubyforge.org/forum/forum.php?thread_id=49751&forum_id=1078
153
215
 
154
- - Raise "OCIError: ORA-01805: possible error in date/time operation"
216
+ See: {http://rubyforge.org/forum/forum.php?thread\_id=49751&forum\_id=1078}
217
+
218
+ - Raise "OCIError: ORA-01805: possible error in date/time operation"
155
219
  when Oracle 11gR2's client and server timezone versions are not same
156
220
  instead of raising a exception "undefined method `*' for nil:NilClass."
157
- See: http://rubyforge.org/forum/forum.php?thread_id=49102&forum_id=1078
158
221
 
159
- - Fix unexpectedly disconnect when failed-logon connections is GC'ed
222
+ See: {http://rubyforge.org/forum/forum.php?thread\_id=49102&forum\_id=1078}
223
+
224
+ - Fix unexpectedly disconnect when failed-logon connections is GC'ed
160
225
  and the connection object's address is accidentally same with
161
226
  an alive connection.
162
227
 
163
- - Fix segmentation fault when calling OCI8::Cursor#[] for
164
- closed statement object's (reported by Hugo L. Borges)
228
+ - Fix segmentation fault when calling {OCI8::Cursor#[]} for
229
+ closed statement objects.
230
+
231
+ (reported by Hugo L. Borges)
232
+
233
+ - Fix a bug that a string is bound to RAW.
234
+ Its encoding had been convertd to {OCI.encoding} incorrectly.
165
235
 
166
- - Fix a bug that a string is bound to RAW.
167
- Its encoding had been convertd to OCI.encoding incorrectly.
236
+ - Fix memory leaks when temporary lobs are used.
168
237
 
169
- - Fix memory leaks when temporary lobs are used.
238
+ - Fix a problem to assign 'NULL' bind value to object type bind variables.
170
239
 
171
- - Fix a problem to assign NULL bind value to object type bind variables.
172
240
  (reported by Raimonds Simanovskis)
173
241
 
174
- - Support LOB datatypes in object type.
242
+ - Support LOB datatypes in object type.
243
+
175
244
  (reported by Michael Sexton)
176
245
 
177
- - Fix to compile on cygwin. The declaration of 'boolean' in Oracle
246
+ - Fix to compile on cygwin. The declaration of 'boolean' in Oracle
178
247
  conflicts with that of latest cygwin.
248
+
179
249
  (reported by Don Hill).
180
250
 
181
- - Fix to complie for the 32-bit ruby which was compiled on x86_64 linux
251
+ - Fix to complie for the 32-bit ruby which was compiled on x86\_64 linux
182
252
  and configured without '--build', '--host' nor '--target'.
183
- The RUBY_PLATFORM is 'x86_64-linux' even though the ruby is 32-bit.
253
+ The 'RUBY_PLATFORM' is 'x86_64-linux' even though the ruby is 32-bit.
254
+
184
255
  (reported by Jason Renschler)
185
256
 
186
- - Fix wrong dependencies in Makefile when running 'make -jNNN (where NNN >= 2)'
257
+ - Fix wrong dependencies in Makefile when running 'make -jNNN (where NNN >= 2)'
258
+
187
259
  (contributed by Alyano Alyanos. See bug #28129 on rubyforge.)
188
260
 
189
- - Fix to compile on HP-UX. Duplicated const qualifiers prevented HP-UX cc
190
- from compiling. (reported by Sebastian YEPES)
261
+ - Fix to compile on HP-UX. Duplicated const qualifiers prevented HP-UX cc
262
+ from compiling.
191
263
 
192
- 2.0.4:
264
+ (reported by Sebastian YEPES)
193
265
 
194
- * New Features
266
+ 2.0.4
267
+ =====
195
268
 
196
- - OCI8.error_message(message_no) -> string
269
+ New Features
270
+ ------------
197
271
 
198
- Gets the Oracle error message specified by message id.
199
- Its language depends on NLS_LANGUAGE.
272
+ ### {OCI8.error_message} is added.
200
273
 
201
- Note: This method is unavailable if the Oracle client
202
- version is 8.0.
274
+ Gets the Oracle error message specified by message id.
275
+ Its language depends on 'NLS_LANGUAGE'.
203
276
 
204
- # When NLS_LANG is AMERICAN_AMERICA.AL32UTF8
205
- OCI8.error_message(1)
206
- # => "ORA-00001: unique constraint (%s.%s) violated"
277
+ Note: This method is unavailable if the Oracle client version is 8.0.
207
278
 
208
- # When NLS_LANG is FRENCH_FRANCE.AL32UTF8
209
- OCI8.error_message(1)
210
- # => "ORA-00001: violation de contrainte unique (%s.%s)"
279
+ # When NLS_LANG is AMERICAN_AMERICA.AL32UTF8
280
+ OCI8.error_message(1)
281
+ # => "ORA-00001: unique constraint (%s.%s) violated"
211
282
 
212
- - OraNumber#dump -> string
283
+ # When NLS_LANG is FRENCH_FRANCE.AL32UTF8
284
+ OCI8.error_message(1)
285
+ # => "ORA-00001: violation de contrainte unique (%s.%s)"
213
286
 
214
- Returns OraNumber's internal representation whose format
215
- is same with the return value of Oracle SQL function DUMP().
287
+ ### {OraNumber#dump} is added.
288
+
289
+ Returns {OraNumber}'s internal representation whose format
290
+ is same with the return value of Oracle SQL function DUMP().
216
291
 
217
- OraNumber.new(100).dump #=> "Typ=2 Len=2: 194,2"
218
- OraNumber.new(123).dump #=> "Typ=2 Len=3: 194,2,24"
219
- OraNumber.new(0.1).dump #=> "Typ=2 Len=2: 192,11"
292
+ OraNumber.new(100).dump #=> "Typ=2 Len=2: 194,2"
293
+ OraNumber.new(123).dump #=> "Typ=2 Len=3: 194,2,24"
294
+ OraNumber.new(0.1).dump #=> "Typ=2 Len=2: 192,11"
220
295
 
221
- * Fixed issues
296
+ Fixed issues
297
+ ------------
222
298
 
223
- - Fractional second part is lost when ruby's Time instance is bound
299
+ - Fractional second part is lost when ruby's Time instance is bound
224
300
  to Oracle datatype TIMESTAMP.
301
+
225
302
  (reported by Raimonds Simanovskis)
226
303
 
227
- - OraNumber#to_i and OraNumber#to_s fail when its scale is larger
304
+ - {OraNumber#to\_i} and {OraNumber#to\_s} fail when its scale is larger
228
305
  than 38.
306
+
229
307
  (reported by Raimonds Simanovskis)
230
308
 
231
- - Memory leak about 30 bytes per one place holder for object type.
232
-
233
- - Segmentation fault when a collection of string is bound.
309
+ - Memory leak about 30 bytes per one place holder for object type.
310
+
311
+ - Segmentation fault when a collection of string is bound.
312
+
234
313
  (reported by Raimonds Simanovskis)
235
314
 
236
- - Segmentation fault when GC starts while initializing a bind
315
+ - Segmentation fault when GC starts while initializing a bind
237
316
  object for object type.
317
+
238
318
  (reported by Remi Gagnon)
239
319
 
240
- - Segmentation fault when OCI8::Cursor#fetch is called prior to
241
- OCI8::Cursor#exec.
320
+ - Segmentation fault when OCI8::Cursor#fetch is called prior to
321
+ {OCI8::Cursor#exec}.
242
322
 
243
- - Detailed error message is not reported when PL/SQL NO_DATA_FOUND
323
+ - Detailed error message is not reported when 'PL/SQL NO_DATA_FOUND'
244
324
  exception is raised.
325
+
245
326
  (reported by Raimonds Simanovskis)
246
327
 
247
- 2.0.3:
328
+ 2.0.3
329
+ =====
248
330
 
249
- * Incompatible Changes
331
+ Incompatible Changes
332
+ --------------------
250
333
 
251
- - Number column in a SQL statement
334
+ ### Number column in a SQL statement
252
335
 
253
- Changes the default data type for number column which fit neither
254
- Integer nor Float from OraNumber to BigDecimal.
336
+ Changes the default data type for number column which fit neither
337
+ Integer nor Float from {OraNumber} to BigDecimal.
255
338
 
256
- conn.exec("select 1.0 from dual") do |row|
257
- p row[0] # => BigDecimal("1") if the ruby-oci8 version is 2.0.3.
258
- # => OraNumber(1) if the version is 2.0.2.
259
- end
339
+ conn.exec("select 1.0 from dual") do |row|
340
+ p row[0] # => BigDecimal("1") if the ruby-oci8 version is 2.0.3.
341
+ # => OraNumber(1) if the version is 2.0.2.
342
+ end
260
343
 
261
- - Priority of OraNumber within numerical types
344
+ ### Priority of OraNumber within numerical types
262
345
 
263
- The return types of basic arithmetic operations with other numerical
264
- types are changed.
346
+ The return types of basic arithmetic operations with other numerical
347
+ types are changed.
265
348
 
266
- 2.0.3:
267
- OraNumber + Integer => OraNumber (OraNumber wins.)
268
- OraNumber + Float => Float (OraNumber loses.)
269
- OraNumber + Rational => Rational (OraNumber loses.)
270
- OraNumber + BigDecimal => BigDecimal (OraNumber loses.)
349
+ 2.0.3:
350
+
351
+ OraNumber + Integer => OraNumber (OraNumber wins.)
352
+ OraNumber + Float => Float (OraNumber loses.)
353
+ OraNumber + Rational => Rational (OraNumber loses.)
354
+ OraNumber + BigDecimal => BigDecimal (OraNumber loses.)
355
+
356
+ 2.0.2:
271
357
 
272
- 2.0.2:
273
- OraNumber + Integer => OraNumber (OraNumber wins always.)
274
- OraNumber + Float => OraNumber
275
- OraNumber + Rational => OraNumber
276
- OraNumber + BigDecimal => OraNumber
358
+ OraNumber + Integer => OraNumber (OraNumber wins always.)
359
+ OraNumber + Float => OraNumber
360
+ OraNumber + Rational => OraNumber
361
+ OraNumber + BigDecimal => OraNumber
277
362
 
278
- - Interval day to second
363
+ ### Interval day to second
279
364
 
280
- The retrived value of Oracle data type "interval day to second"
281
- was changed from the number of days as a Rational to the number
282
- of seconds as a Float by default.
283
- Use OCI8::BindType::IntervalDS.unit = :day to make it compatible
284
- with the previous versions.
365
+ The retrived value of Oracle data type "interval day to second"
366
+ was changed from the number of days as a Rational to the number
367
+ of seconds as a Float by default.
368
+ Use 'OCI8::BindType::IntervalDS.unit = :day' to make it compatible
369
+ with the previous versions.
285
370
 
286
- conn.exec("select to_dsinterval('0 00:00:01') from dual") do |row|
287
- p row[0] # => 1.0 if the version is 2.0.3 and
288
- # OCI8::BindType::IntervalDS.unit is :second.
289
- # => (1/86400) if the version is 2.0.3 and
290
- # OCI8::BindType::IntervalDS.unit is :day or
291
- # the version is 2.0.2.
292
- end
371
+ conn.exec("select to_dsinterval('0 00:00:01') from dual") do |row|
372
+ p row[0] # => 1.0 if the version is 2.0.3 and
373
+ # OCI8::BindType::IntervalDS.unit is :second.
374
+ # => (1/86400) if the version is 2.0.3 and
375
+ # OCI8::BindType::IntervalDS.unit is :day or
376
+ # the version is 2.0.2.
377
+ end
293
378
 
294
- - Date, timestamp, timestamp with time zone data types and ruby 1.9.2
379
+ ### Date, timestamp, timestamp with time zone data types and ruby 1.9.2
295
380
 
296
- These data types are retrived always as Time values when the
297
- ruby version is 1.9.2 because the Time class is enhanced to
298
- represent any time zone and is free from year 2038 problem.
381
+ These data types are retrived always as Time values when the
382
+ ruby version is 1.9.2 because the Time class is enhanced to
383
+ represent any time zone and is free from year 2038 problem.
299
384
 
300
- Prior to ruby 1.9.2, if the time cannot be represented by
301
- Unix time or the time zone is neither utc nor local, they are
302
- retrived as DateTime values.
385
+ Prior to ruby 1.9.2, if the time cannot be represented by
386
+ Unix time or the time zone is neither utc nor local, they are
387
+ retrived as DateTime values.
303
388
 
304
- - Non-blocking mode and ruby 1.9
389
+ ### Non-blocking mode and ruby 1.9
305
390
 
306
- non-blocking mode is enabled by default when the ruby is 1.9.
391
+ Non-blocking mode is enabled by default when the ruby is 1.9.
307
392
 
308
- * New Features
393
+ New Features
394
+ ------------
309
395
 
310
- - BigDecimal and Rational are availabe as bind values.
396
+ ### BigDecimal and Rational are availabe as bind values.
311
397
 
312
- - New methods OCI8#module=, OCI8#action= and OCI8#client_info= are added.
398
+ ### New methods {OCI8#module=}, {OCI8#action=} and {OCI8#client_info=} are added.
313
399
 
314
- These methods change the module name, the action name and the client_info
315
- in the current session respectively.
400
+ These methods change the module name, the action name and the client_info
401
+ in the current session respectively.
316
402
 
317
- After Oracle 10g client, these don't perform network round trips.
318
- The change is reflected to the server by the next round trip such as
319
- OCI8#exec, OCI8#ping, etc.
403
+ After Oracle 10g client, these don't perform network round trips.
404
+ The change is reflected to the server by the next round trip such as
405
+ {OCI8#exec}, {OCI8#ping}, etc.
320
406
 
321
- Prior to Oracle 10g client, these call PL/SQL functions such as
322
- DBMS_APPLICATION_INFO.SET_MODULE, DBMS_APPLICATION_INFO.SET_ACTION,
323
- and DBMS_APPLICATION_INFO.SET_CLIENT_INFO internally.
324
- The change is reflected immediately by a network round trip.
407
+ Prior to Oracle 10g client, these call PL/SQL functions such as
408
+ `DBMS_APPLICATION_INFO.SET_MODULE`, `DBMS_APPLICATION_INFO.SET_ACTION`,
409
+ and `DBMS_APPLICATION_INFO.SET_CLIENT_INFO` internally.
410
+ The change is reflected immediately by a network round trip.
325
411
 
326
- - OCI8::BindType.default_timezone
412
+ ### {OCI8::BindType.default_timezone}
413
+
414
+ The default time zone of Time or DateTime values. This parameter is used only when
415
+
416
+ * date values are fetched and the Oracle client version is 8.x
327
417
 
328
- The default time zone of Time or DateTime values.
329
- This parameter is used only when
330
- (1) date values are fetched and the Oracle client version is 8.x
331
418
  or
332
- (2) object types have date data type attributes.
333
419
 
334
- Note that if the Oracle client version is 9i or upper, the time
335
- zone is determined by the session time zone. The default value
336
- is local time zone. You can change it to GMT by executing the
337
- following SQL statement for each connection.
420
+ * object types have date data type attributes.
421
+
422
+ Note that if the Oracle client version is 9i or upper, the time
423
+ zone is determined by the session time zone. The default value
424
+ is local time zone. You can change it to GMT by executing the
425
+ following SQL statement for each connection.
426
+
427
+ alter session set time_zone = '00:00'
338
428
 
339
- alter session set time_zone = '00:00'
429
+ Note: The session time zone is set by the environment variable TZ from
430
+ ruby-oci8 2.1.0.
340
431
 
341
- * Other specification changes
432
+ Other specification changes
433
+ ---------------------------
342
434
 
343
- - Add a global function OraNumber(obj) as a shortcut of OraNumber.new(obj)
435
+ - Add a global function OraNumber(obj) as a shortcut of OraNumber.new(obj)
344
436
  as Rational and BigDecimal do.
345
437
 
346
- - Fix to accept nil attribute in object type's
438
+ - Fix to accept nil attribute in object type's
347
439
  constructors. This works only for simple data types such as number,
348
440
  string. But it doesn't for complex types such as object types.
349
441
  (requested by Remi Gagnon)
350
442
 
351
- - add DATE datatype support in object types.
443
+ - add DATE datatype support in object types.
352
444
 
353
- - Change OCI8::LOB#write to accept an object which is not a String and
445
+ - Change {OCI8::LOB#write} to accept an object which is not a String and
354
446
  doesn't respond to 'to_str' as IO#write does.
355
447
  (requested by Christopher Jones)
356
448
 
357
- - Change the initial polling interval of
449
+ - Change the initial polling interval of
358
450
  non-blocking mode for ruby 1.8 from 100 msec to 10 msec, which
359
451
  is same with ruby-oci8 1.0.
360
452
 
361
- * Fixed installation issues.
453
+ Fixed installation issues
454
+ -------------------------
362
455
 
363
- - Fix oraconf.rb for ruby 1.8.5 with Oracle 8.x which needs some object
456
+ - Fix oraconf.rb for ruby 1.8.5 with Oracle 8.x which needs some object
364
457
  files to link with.
458
+
365
459
  (reported by Jayson Cena)
366
460
 
367
- - Fix oraconf.rb for ruby 1.9.2 preview1.
461
+ - Fix oraconf.rb for ruby 1.9.2 preview1.
462
+
368
463
  (pointed by Raimonds Simanovskis)
369
464
 
370
- - Fix oraconf.rb to compile for AIX instant clients.
465
+ - Fix oraconf.rb to compile for AIX instant clients.
466
+
371
467
  (reported by Kazuya Teramoto)
372
468
 
373
- 2.0.2:
469
+ 2.0.2
470
+ =====
471
+
472
+ * add new methods
473
+ - {OCI8#select_one}
474
+
475
+ - {OCI8#ping} -> true or false
476
+
477
+ Verifies that the Oracle connection is alive.
478
+ {OCI8#ping} also can be used to flush all the pending OCI
479
+ client-side calls to the server if any exist.
480
+
481
+ - {OCI8#client\_identifier=}client\_id
374
482
 
375
- * add new methods
376
- - OCI8#select_one(sql, *bindvars) -> first_row
483
+ Look at the following link to know what is the client identifier.
484
+ {http://it.toolbox.com/blogs/database-solutions/oracle-session-tracing-part-i-16356}
377
485
 
378
- - OCI8#ping -> true or false
486
+ Note that the specified identifier doesn't change the v$session
487
+ immediately. It is done by the next network round trip
488
+ such as OCI8#exec or OCI8#ping.
379
489
 
380
- Verifies that the Oracle connection is alive.
381
- OCI8#ping also can be used to flush all the pending OCI
382
- client-side calls to the server if any exist.
490
+ * fix problems when compiling with Oracle 9.2 and 8.0.
383
491
 
384
- - OCI8#client_identifier = client_id
492
+ (reported by Axel Reinhold)
385
493
 
386
- Look at the following link to know what is the client identifier.
387
- http://it.toolbox.com/blogs/database-solutions/oracle-session-tracing-part-i-16356
494
+ * [dbi] fix to pass a newly added sanity check in dbi 0.4.1.
388
495
 
389
- Note that the specified identifier doesn't change the v$session
390
- immediately. It is done by the next network round trip
391
- such as OCI8#exec or OCI8#ping.
496
+ (reported by Dirk Herzhauser)
392
497
 
393
- * fix problems when compiling with Oracle 9.2 and 8.0.
394
- (reported by Axel Reinhold)
498
+ * fix an error when executing "select NULL from dual".
395
499
 
396
- * [dbi] fix to pass a newly added sanity check in dbi 0.4.1.
397
- (reported by Dirk Herzhauser)
500
+ {http://rubyforge.org/forum/forum.php?thread\_id=32468&forum\_id=1078}
501
+ (contributed by Raimonds Simanovskis)
398
502
 
399
- * fix an error when executing "select NULL from dual".
400
- http://rubyforge.org/forum/forum.php?thread_id=32468&forum_id=1078
401
- (contributed by Raimonds Simanovskis)
503
+ * [ruby 1.9] fix OCI8::BLOB to read/write binary. Prior to 2.0.1,
402
504
 
403
- * [ruby 1.9] fix OCI8::BLOB to read/write binary. Prior to 2.0.1,
404
- it was treated as text tagged with NLS_LANG encoding.
505
+ it was treated as text tagged with 'NLS_LANG' encoding.
405
506
 
406
- * [ruby 1.9] fix to bind string data by the length got from String#bytesize
407
- converted to OCI8.encoding, not by String#size.
507
+ * [ruby 1.9] fix to bind string data by the length got from String#bytesize
508
+ converted to {OCI8.encoding}, not by String#size.
408
509
 
409
- 2.0.1:
510
+ 2.0.1
511
+ =====
410
512
 
411
- * release a binary gem for Windows, which contains libraries for both
412
- ruby 1.8 and ruby 1.9.1.
413
- * add OCI8#oracle_server_version.
414
- * fix bugs when fetching and binding time objects.
513
+ * release a binary gem for Windows, which contains libraries for both
514
+ ruby 1.8 and ruby 1.9.1.
515
+ * add {OCI8#oracle\_server\_version}.
516
+ * fix bugs when fetching and binding time objects.