ruby-oci8 2.1.2-x86-mingw32 → 2.1.3-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +3 -0
- data/COPYING +30 -0
- data/COPYING_old +64 -0
- data/ChangeLog +115 -0
- data/Makefile +8 -4
- data/NEWS +60 -1
- data/README.md +9 -4
- data/VERSION +1 -1
- data/dist-files +5 -0
- data/lib/oci8.rb +32 -19
- data/lib/oci8.rb.in +30 -17
- data/lib/oci8/connection_pool.rb +16 -27
- data/lib/oci8/cursor.rb +564 -0
- data/lib/oci8/datetime.rb +11 -17
- data/lib/oci8/encoding-init.rb +1 -0
- data/lib/oci8/metadata.rb +76 -151
- data/lib/oci8/object.rb +3 -3
- data/lib/oci8/oci8.rb +29 -335
- data/lib/oci8lib_18.map +1091 -1126
- data/lib/oci8lib_18.so +0 -0
- data/lib/oci8lib_191.map +1145 -1197
- data/lib/oci8lib_191.so +0 -0
- data/ruby-oci8.gemspec +1 -0
- data/setup.rb +4 -2
- data/test/config.rb +64 -0
- data/test/setup_test_object.sql +171 -0
- data/test/test_all.rb +1 -0
- data/test/test_break.rb +18 -2
- data/test/test_clob.rb +4 -4
- data/test/test_datetime.rb +8 -47
- data/test/test_metadata.rb +78 -0
- data/test/test_object.rb +463 -0
- data/test/test_oci8.rb +22 -0
- metadata +11 -6
data/.yardopts
CHANGED
data/COPYING
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# @markup pre
|
2
|
+
|
3
|
+
License from ruby-oci8 2.1.3
|
4
|
+
|
5
|
+
---
|
6
|
+
Copyright 2002-2012 Kubo Takehiro <kubo@jiubao.org>. All rights reserved.
|
7
|
+
|
8
|
+
Redistribution and use in source and binary forms, with or without modification, are
|
9
|
+
permitted provided that the following conditions are met:
|
10
|
+
|
11
|
+
1. Redistributions of source code must retain the above copyright notice, this list of
|
12
|
+
conditions and the following disclaimer.
|
13
|
+
|
14
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list
|
15
|
+
of conditions and the following disclaimer in the documentation and/or other materials
|
16
|
+
provided with the distribution.
|
17
|
+
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
19
|
+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
|
21
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
22
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
23
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
24
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
25
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
26
|
+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
|
28
|
+
The views and conclusions contained in the software and documentation are those of the
|
29
|
+
authors and should not be interpreted as representing official policies, either expressed
|
30
|
+
or implied, of the authors.
|
data/COPYING_old
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# @markup pre
|
2
|
+
|
3
|
+
License until ruby-oci8 2.1.2
|
4
|
+
|
5
|
+
The license of ruby-oci8 was changed to 2-clause BSD license by using the following
|
6
|
+
2.d clause.
|
7
|
+
|
8
|
+
---
|
9
|
+
Ruby-oci8 is copyrighted free software by Kubo Takehiro <kubo@jiubao.org>.
|
10
|
+
You can redistribute it and/or modify it under either the terms of the GPL
|
11
|
+
version 2 (see the file GPL), or the conditions below:
|
12
|
+
|
13
|
+
1. You may make and give away verbatim copies of the source form of the
|
14
|
+
software without restriction, provided that you duplicate all of the
|
15
|
+
original copyright notices and associated disclaimers.
|
16
|
+
|
17
|
+
2. You may modify your copy of the software in any way, provided that
|
18
|
+
you do at least ONE of the following:
|
19
|
+
|
20
|
+
a) place your modifications in the Public Domain or otherwise
|
21
|
+
make them Freely Available, such as by posting said
|
22
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
23
|
+
the author to include your modifications in the software.
|
24
|
+
|
25
|
+
b) use the modified software only within your corporation or
|
26
|
+
organization.
|
27
|
+
|
28
|
+
c) give non-standard binaries non-standard names, with
|
29
|
+
instructions on where to get the original software distribution.
|
30
|
+
|
31
|
+
d) make other distribution arrangements with the author.
|
32
|
+
|
33
|
+
3. You may distribute the software in object code or binary form,
|
34
|
+
provided that you do at least ONE of the following:
|
35
|
+
|
36
|
+
a) distribute the binaries and library files of the software,
|
37
|
+
together with instructions (in the manual page or equivalent)
|
38
|
+
on where to get the original distribution.
|
39
|
+
|
40
|
+
b) accompany the distribution with the machine-readable source of
|
41
|
+
the software.
|
42
|
+
|
43
|
+
c) give non-standard binaries non-standard names, with
|
44
|
+
instructions on where to get the original software distribution.
|
45
|
+
|
46
|
+
d) make other distribution arrangements with the author.
|
47
|
+
|
48
|
+
4. You may modify and include the part of the software into any other
|
49
|
+
software (possibly commercial). But some files in the distribution
|
50
|
+
are not written by the author, so that they are not under these terms.
|
51
|
+
|
52
|
+
For the list of those files and their copying conditions, see the
|
53
|
+
file LEGAL.
|
54
|
+
|
55
|
+
5. The scripts and library files supplied as input to or produced as
|
56
|
+
output from the software do not automatically fall under the
|
57
|
+
copyright of the software, but belong to whomever generated them,
|
58
|
+
and may be sold commercially, and may be aggregated with this
|
59
|
+
software.
|
60
|
+
|
61
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
62
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
63
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
64
|
+
PURPOSE.
|
data/ChangeLog
CHANGED
@@ -1,3 +1,118 @@
|
|
1
|
+
2012-11-11 KUBO Takehiro <kubo@jiubao.org>
|
2
|
+
* ext/oci8/lob.c: use OCILobLocatorAssign_nb (non-blocking version)
|
3
|
+
instead of OCILobLocatorAssign (blocking version).
|
4
|
+
|
5
|
+
2012-11-11 KUBO Takehiro <kubo@jiubao.org>
|
6
|
+
* NEWS: add changes between 2.1.3 and 2.1.2
|
7
|
+
* VERSION: change the version to 2.1.3.
|
8
|
+
* dist-files: append new files.
|
9
|
+
* ruby-oci8.gemspec: declare license in the gem.
|
10
|
+
|
11
|
+
2012-11-11 KUBO Takehiro <kubo@jiubao.org>
|
12
|
+
* Makefile: add doc and copy-doc targets to generate document by yard command.
|
13
|
+
* ext/oci8/oci8.c, ext/oci8/oci8.h, ext/oci8/oci8lib.c: change
|
14
|
+
protoptype definition of Init_oci8 for yard command to parse it.
|
15
|
+
* ext/oci8/encoding.c, ext/oci8/oci8.c, ext/oci8/ocinumber.c,
|
16
|
+
lib/oci8.rb.in, lib/oci8/connection_pool.rb, lib/oci8/datetime.rb,
|
17
|
+
lib/oci8/encoding-init.rb, lib/oci8/metadata.rb, lib/oci8/object.rb,
|
18
|
+
lib/oci8/oci8.rb: change comments for yard command.
|
19
|
+
|
20
|
+
2012-11-11 KUBO Takehiro <kubo@jiubao.org>
|
21
|
+
* ext/oci8/oci8.h: update RB_GC_GUARD as ruby 1.9.2 defines.
|
22
|
+
* test/test_break.rb: fix tests for rubinius 1.2.4 and 2.0.0.
|
23
|
+
|
24
|
+
2012-11-10 KUBO Takehiro <kubo@jiubao.org>
|
25
|
+
* ext/oci8/oci8lib.c: fix compilation errors when ruby version is 1.8.x.
|
26
|
+
* ext/oci8/ocinumber.c: Don't use rb_Rational() when rbx-2.0.testing
|
27
|
+
runs with ruby 1.8 mode.
|
28
|
+
* lib/oci8/datetime.rb: fix #<NoMethodError: undefined method `timezone' for Time:Class>
|
29
|
+
when ruby is less than 1.9.2 and an object type's time attribute
|
30
|
+
is accessed.
|
31
|
+
* test/config.rb, test/test_oci8.rb: for ruby 1.8.x.
|
32
|
+
|
33
|
+
2012-10-28 KUBO Takehiro <kubo@jiubao.org>
|
34
|
+
* ext/oci8/extconf.rb: Use rb_thread_call_without_gvl only when
|
35
|
+
ruby/thread.h exists. rb_thread_call_without_gvl is an internal
|
36
|
+
function in ruby 1.9.2 and 1.9.3.
|
37
|
+
* ext/oci8/oci8lib.c: fix compilation errors when ruby <= 1.9.1.
|
38
|
+
* setup.rb: fix uninitialized constant Config (NameError) on ruby 1.8.7.
|
39
|
+
|
40
|
+
2012-10-28 KUBO Takehiro <kubo@jiubao.org>
|
41
|
+
* ext/oci8/lob.c, ext/oci8/oci8.c, ext/oci8/oci8.h, ext/oci8/oci8lib.c:
|
42
|
+
Fix SEGV when a temporary LOB is GCed while another LOB is read.
|
43
|
+
(github issue #20 reported by techsplicer)
|
44
|
+
|
45
|
+
2012-10-02 KUBO Takehiro <kubo@jiubao.org>
|
46
|
+
* ext/oci8/apiwrap.c.tmpl, ext/oci8/connection_pool.c, ext/oci8/env.c,
|
47
|
+
ext/oci8/extconf.rb, ext/oci8/oci8.c, ext/oci8/oci8.h, ext/oci8/oci8lib.c,
|
48
|
+
ext/oci8/thread_util.c, ext/oci8/thread_util.h:
|
49
|
+
replace rb_thread_blocking_region(), which is deprecated in ruby 2.0.0,
|
50
|
+
with rb_thread_call_without_gvl() and rename oci8_blocking_region()
|
51
|
+
to oci8_call_without_gvl().
|
52
|
+
* lib/oci8.rb.in: Ruby 2.0.0-dev's API version is changed to 2.0.0.
|
53
|
+
* setup.rb: use RbConfig instead of Config for ruby 2.0.0-dev.
|
54
|
+
|
55
|
+
2012-08-12 KUBO Takehiro <kubo@jiubao.org>
|
56
|
+
* ext/oci8/stmt.c, lib/oci8/cursor.rb: revise yard comment.
|
57
|
+
|
58
|
+
2012-08-11 KUBO Takehiro <kubo@jiubao.org>
|
59
|
+
* ext/oci8/stmt.c, lib/oci8/cursor.rb: refactor OCI8::Cursor to simplify
|
60
|
+
C code.
|
61
|
+
* ext/oci8/bind.c: add a private function OCI8::BindType::Base#get_data
|
62
|
+
and #set_data.
|
63
|
+
* ext/oci8/attr.c, ext/oci8/oci8.h, ext/oci8/oci8lib.c: delete
|
64
|
+
unused functions and a unused variable.
|
65
|
+
|
66
|
+
2012-08-11 KUBO Takehiro <kubo@jiubao.org>
|
67
|
+
* lib/oci8.rb.in, lib/oci8/cursor.rb, lib/oci8/oci8.rb:
|
68
|
+
move OCI8::Cursor from lib/oci8/oci8.rb to lib/oci8/cursor.rb.
|
69
|
+
|
70
|
+
2012-08-05 KUBO Takehiro <kubo@jiubao.org>
|
71
|
+
* lib/oci8/object.rb: Change the ruby type which corresponds to
|
72
|
+
Oracle object type's DATE field from DateTime to Time.
|
73
|
+
* test/setup_test_object.sql, test/test_object.rb:
|
74
|
+
Fix github issue #17 reported by Yasuo Honda.
|
75
|
+
|
76
|
+
2012-07-31 KUBO Takehiro <kubo@jiubao.org>
|
77
|
+
* test/config.rb, test/test_datetime.rb: refactor test code by adding
|
78
|
+
global functions convert_to_time() and convert_to_datetime(),
|
79
|
+
which will be used by test_object.rb later.
|
80
|
+
|
81
|
+
2012-07-28 KUBO Takehiro <kubo@jiubao.org>
|
82
|
+
* test/test_metadata.rb: fix a sequence test failure on Oracle 11gR2.
|
83
|
+
Fix github issue #18 reported by Yasuo Honda.
|
84
|
+
|
85
|
+
2012-07-28 KUBO Takehiro <kubo@jiubao.org>
|
86
|
+
* lib/oci8/oci8.rb, test/test_oci8.rb: add OCI8::Cursor#statement.
|
87
|
+
See github issue #12 requested by timon.
|
88
|
+
|
89
|
+
2012-05-25 KUBO Takehiro <kubo@jiubao.org>
|
90
|
+
* test/test_clob.rb: speed up clob tests 29 times.
|
91
|
+
|
92
|
+
2012-05-25 KUBO Takehiro <kubo@jiubao.org>
|
93
|
+
* test/setup_test_object.sql, test/test_all.rb, test/test_object.rb:
|
94
|
+
Add tests of the previous commit.
|
95
|
+
|
96
|
+
2012-05-25 KUBO Takehiro <kubo@jiubao.org>
|
97
|
+
* ext/oci8/lob.c: Merge pull request #13 from timon/temp_lob at github.
|
98
|
+
If 's' is a temporary lob, use OCILobLocatorAssign instead.
|
99
|
+
|
100
|
+
2012-05-20 KUBO Takehiro <kubo@jiubao.org>
|
101
|
+
* ext/oci8/oci8.c, test/test_oci8.rb: add OCI8's class variables:
|
102
|
+
@@environment_handle and @@process_handle.
|
103
|
+
|
104
|
+
2012-05-20 KUBO Takehiro <kubo@jiubao.org>
|
105
|
+
* ext/oci8/ocihandle.c, lib/oci8/metadata.rb, test/test_metadata.rb:
|
106
|
+
fix methods of OCI8::Metadata::Sequence and add testcases for them.
|
107
|
+
|
108
|
+
2012-05-12 KUBO Takehiro <kubo@jiubao.org>
|
109
|
+
* ext/oci8/extconf.rb, lib/oci8.rb.in: refactor code which generates the
|
110
|
+
C extention name.
|
111
|
+
|
112
|
+
2012-05-05 KUBO Takehiro <kubo@jiubao.org>
|
113
|
+
* ext/oci8/oci8.c, lib/oci8/oci8.rb: delete private methods OCI8#server_handle
|
114
|
+
and OCI8#session_handle and use @server_handle and @session_handle instead.
|
115
|
+
|
1
116
|
2012-04-28 KUBO Takehiro <kubo@jiubao.org>
|
2
117
|
* NEWS: add changes between 2.1.2 and 2.1.1
|
3
118
|
* VERSION: change the version to 2.1.2.
|
data/Makefile
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
VERSION = `cat VERSION`
|
2
2
|
RUBY = ruby -w
|
3
|
-
RDOC = rdoc
|
4
3
|
|
5
4
|
all: build
|
6
5
|
|
@@ -29,10 +28,15 @@ format_c_source:
|
|
29
28
|
astyle --options=none --style=linux --indent=spaces=4 --brackets=linux --suffix=none ext/oci8/*.[ch]
|
30
29
|
|
31
30
|
# internal use only
|
32
|
-
.PHONY:
|
31
|
+
.PHONY: dist dist-check doc copy-doc
|
33
32
|
|
34
|
-
|
35
|
-
|
33
|
+
doc:
|
34
|
+
rm -rf doc
|
35
|
+
TZ= yard
|
36
|
+
echo DirectoryIndex frames.html > doc/.htaccess
|
37
|
+
|
38
|
+
copy-doc: doc
|
39
|
+
rsync -avz doc/ rubyforge.org:/var/www/gforge-projects/ruby-oci8/en
|
36
40
|
|
37
41
|
dist:
|
38
42
|
-rm -rf ruby-oci8-$(VERSION)
|
data/NEWS
CHANGED
@@ -1,5 +1,63 @@
|
|
1
1
|
# @markup markdown
|
2
2
|
|
3
|
+
2.1.3
|
4
|
+
=====
|
5
|
+
|
6
|
+
New Features
|
7
|
+
------------
|
8
|
+
|
9
|
+
### {OCI8::Cursor#statement}
|
10
|
+
|
11
|
+
It returns the text of the SQL statement prepared in the cursor.
|
12
|
+
|
13
|
+
cursor = conn.parse("select * from country where country_code = 'ja'")
|
14
|
+
cursor.statement # => "select * from country where country_code = 'ja'"
|
15
|
+
|
16
|
+
See: [github issue #16](https://github.com/kubo/ruby-oci8/issues/16)
|
17
|
+
|
18
|
+
Specification changes
|
19
|
+
---------------------
|
20
|
+
|
21
|
+
### License was changed to 2-clause BSD-style license.
|
22
|
+
|
23
|
+
The former license was same with old ruby (<= 1.9.2) license.
|
24
|
+
|
25
|
+
### Oracle object type's DATE field type
|
26
|
+
|
27
|
+
Ruby-oci8 had returned a DateTime object when Oracle object type's DATE
|
28
|
+
field type was accessed. Now it returns a Time object.
|
29
|
+
|
30
|
+
Fixed Issues
|
31
|
+
------------
|
32
|
+
|
33
|
+
- Fix to work with procedures and functions that return temporary lobs.
|
34
|
+
See: [github issue #13](https://github.com/kubo/ruby-oci8/issues/13)
|
35
|
+
|
36
|
+
(contributed by timon)
|
37
|
+
|
38
|
+
- Fix Oracle object type's DATE field tests.
|
39
|
+
See: [github issue #17](https://github.com/kubo/ruby-oci8/issues/17)
|
40
|
+
|
41
|
+
(reported by Yasuo Honda)
|
42
|
+
|
43
|
+
- Fix a sequence test failure on Oracle 11gR2.
|
44
|
+
See: [github issue #18](https://github.com/kubo/ruby-oci8/issues/18)
|
45
|
+
|
46
|
+
(reported by Yasuo Honda)
|
47
|
+
|
48
|
+
- Include COPYING files.
|
49
|
+
See: [github issue #19](https://github.com/kubo/ruby-oci8/issues/19)
|
50
|
+
|
51
|
+
(requested by Johannes Weberhofer)
|
52
|
+
|
53
|
+
- Fix SEGV when a temporary LOB is GCed while another LOB is read.
|
54
|
+
See: [github issue #20](https://github.com/kubo/ruby-oci8/issues/20)
|
55
|
+
|
56
|
+
(reported by techsplicer)
|
57
|
+
|
58
|
+
- Fix #<NoMethodError: undefined method `timezone' for Time:Class>
|
59
|
+
when ruby is less than 1.9.2 and an object type's time attribute is accessed.
|
60
|
+
|
3
61
|
2.1.2
|
4
62
|
=====
|
5
63
|
|
@@ -10,6 +68,7 @@ Specification changes
|
|
10
68
|
|
11
69
|
This is workaround about a SIGSEGV issue.
|
12
70
|
See: [oracle enhanced issue #162](https://github.com/rsim/oracle-enhanced/issues/162)
|
71
|
+
|
13
72
|
Fixed Issues
|
14
73
|
------------
|
15
74
|
|
@@ -254,7 +313,7 @@ Fixed issues
|
|
254
313
|
(reported by Hugo L. Borges)
|
255
314
|
|
256
315
|
- Fix a bug that a string is bound to RAW.
|
257
|
-
Its encoding had been convertd to {
|
316
|
+
Its encoding had been convertd to {OCI8.encoding} incorrectly.
|
258
317
|
|
259
318
|
- Fix memory leaks when temporary lobs are used.
|
260
319
|
|
data/README.md
CHANGED
@@ -7,8 +7,6 @@ Instant Client.
|
|
7
7
|
|
8
8
|
If you need to use Oracle 8, use ruby-oci8 2.0.6.
|
9
9
|
|
10
|
-
As for Oracle7, use Oracle7 Module for Ruby by Yoshida Masato.
|
11
|
-
|
12
10
|
What's new
|
13
11
|
==========
|
14
12
|
|
@@ -23,9 +21,10 @@ Connect to scott/tiger, select `emp` and print as CSV format.
|
|
23
21
|
|
24
22
|
If you install a ruby-oci8 gem package, you may need to add `-rubygems` before `-r oci8`.
|
25
23
|
|
26
|
-
|
27
|
-
|
24
|
+
Documantation
|
25
|
+
=============
|
28
26
|
|
27
|
+
* [Reference Manual](http://ruby-oci8.rubyforge.org/en/)
|
29
28
|
* {file:docs/install-full-client.md}
|
30
29
|
* {file:docs/install-instant-client.md}
|
31
30
|
* {file:docs/install-binary-package.md}
|
@@ -36,3 +35,9 @@ Report issues
|
|
36
35
|
* {file:docs/report-installation-issue.md}
|
37
36
|
* [The issues page on github](https://github.com/kubo/ruby-oci8/issues)
|
38
37
|
* [The ruby-oci8 help forum on rubyforge](http://rubyforge.org/forum/forum.php?forum_id=1078)
|
38
|
+
|
39
|
+
License
|
40
|
+
=======
|
41
|
+
|
42
|
+
* {file:COPYING 2-clause BSD-style license} from ruby-oci8 2.1.3
|
43
|
+
* {file:COPYING_old old Ruby license} until 2.1.2
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.3
|
data/dist-files
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
.yardopts
|
2
|
+
COPYING
|
3
|
+
COPYING_old
|
2
4
|
ChangeLog
|
3
5
|
Makefile
|
4
6
|
NEWS
|
@@ -52,6 +54,7 @@ lib/oci8/.document
|
|
52
54
|
lib/oci8/bindtype.rb
|
53
55
|
lib/oci8/compat.rb
|
54
56
|
lib/oci8/connection_pool.rb
|
57
|
+
lib/oci8/cursor.rb
|
55
58
|
lib/oci8/datetime.rb
|
56
59
|
lib/oci8/encoding-init.rb
|
57
60
|
lib/oci8/encoding.yml
|
@@ -63,6 +66,7 @@ lib/oci8/oracle_version.rb
|
|
63
66
|
lib/oci8/properties.rb
|
64
67
|
test/README
|
65
68
|
test/config.rb
|
69
|
+
test/setup_test_object.sql
|
66
70
|
test/test_all.rb
|
67
71
|
test/test_appinfo.rb
|
68
72
|
test/test_array_dml.rb
|
@@ -79,6 +83,7 @@ test/test_dbi.rb
|
|
79
83
|
test/test_dbi_clob.rb
|
80
84
|
test/test_error.rb
|
81
85
|
test/test_metadata.rb
|
86
|
+
test/test_object.rb
|
82
87
|
test/test_oci8.rb
|
83
88
|
test/test_oracle_version.rb
|
84
89
|
test/test_oradate.rb
|
data/lib/oci8.rb
CHANGED
@@ -23,48 +23,57 @@ if RUBY_PLATFORM =~ /cygwin/
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
|
27
|
-
if defined? RUBY_ENGINE and RUBY_ENGINE != 'ruby'
|
28
|
-
so_basename += RUBY_ENGINE
|
29
|
-
end
|
26
|
+
ruby_engine = (defined? RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'
|
30
27
|
|
31
|
-
|
32
|
-
|
33
|
-
#
|
34
|
-
#
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
when /^
|
39
|
-
|
28
|
+
so_basename = 'oci8lib_'
|
29
|
+
if ruby_engine == 'ruby'
|
30
|
+
# The suffix number indicates the ruby API version.
|
31
|
+
# 1.8 - ruby 1.8.x
|
32
|
+
# 1.9.1 - ruby 1.9.1, 1.9.2
|
33
|
+
# 2.0.0 - ruby 2.0.0-dev at the present time.
|
34
|
+
case RUBY_VERSION
|
35
|
+
when /^2\.0/
|
36
|
+
so_basename += '200'
|
37
|
+
when /^1\.9/
|
38
|
+
so_basename += '191'
|
39
|
+
when /^1\.8/
|
40
|
+
so_basename += '18'
|
41
|
+
else
|
42
|
+
raise 'unsupported ruby version: ' + RUBY_VERSION
|
43
|
+
end
|
40
44
|
else
|
41
|
-
|
45
|
+
so_basename += ruby_engine
|
42
46
|
end
|
43
47
|
require so_basename
|
44
48
|
|
45
|
-
if OCI8::VERSION != '2.1.
|
49
|
+
if OCI8::VERSION != '2.1.3'
|
46
50
|
require 'rbconfig'
|
47
51
|
so_name = so_basename + "." + Config::CONFIG['DLEXT']
|
48
|
-
raise "VERSION MISMATCH! #{so_name} version is #{OCI8::VERSION}, but oci8.rb version is 2.1.
|
52
|
+
raise "VERSION MISMATCH! #{so_name} version is #{OCI8::VERSION}, but oci8.rb version is 2.1.3."
|
49
53
|
end
|
50
54
|
|
51
55
|
require 'oci8/encoding-init.rb'
|
52
56
|
require 'oci8/oracle_version.rb'
|
53
57
|
|
54
58
|
class OCI8
|
59
|
+
# @private
|
55
60
|
ORAVER_8_0 = OCI8::OracleVersion.new(8, 0)
|
61
|
+
# @private
|
56
62
|
ORAVER_8_1 = OCI8::OracleVersion.new(8, 1)
|
63
|
+
# @private
|
57
64
|
ORAVER_9_0 = OCI8::OracleVersion.new(9, 0)
|
65
|
+
# @private
|
58
66
|
ORAVER_9_2 = OCI8::OracleVersion.new(9, 2)
|
67
|
+
# @private
|
59
68
|
ORAVER_10_1 = OCI8::OracleVersion.new(10, 1)
|
69
|
+
# @private
|
60
70
|
ORAVER_10_2 = OCI8::OracleVersion.new(10, 2)
|
71
|
+
# @private
|
61
72
|
ORAVER_11_1 = OCI8::OracleVersion.new(11, 1)
|
62
73
|
|
74
|
+
# @private
|
63
75
|
@@oracle_client_version = OCI8::OracleVersion.new(self.oracle_client_vernum)
|
64
76
|
|
65
|
-
# :call-seq:
|
66
|
-
# OCI8.oracle_client_version -> oraver
|
67
|
-
#
|
68
77
|
# Returns an OCI8::OracleVersion of the Oracle client version.
|
69
78
|
#
|
70
79
|
# If this library is configured without '--with-runtime-check',
|
@@ -78,11 +87,14 @@ class OCI8
|
|
78
87
|
#
|
79
88
|
# Otherwise, it is the version retrieved from an OCI function
|
80
89
|
# OCIClientVersion().
|
90
|
+
#
|
91
|
+
# @return [OCI8::OracleVersion] Oracle client version
|
81
92
|
def self.oracle_client_version
|
82
93
|
@@oracle_client_version
|
83
94
|
end
|
84
95
|
|
85
96
|
# defined for backward compatibility.
|
97
|
+
# @private
|
86
98
|
CLIENT_VERSION = @@oracle_client_version.major.to_s +
|
87
99
|
@@oracle_client_version.minor.to_s +
|
88
100
|
@@oracle_client_version.update.to_s
|
@@ -91,6 +103,7 @@ end
|
|
91
103
|
require 'oci8/ocihandle.rb'
|
92
104
|
require 'oci8/datetime.rb'
|
93
105
|
require 'oci8/oci8.rb'
|
106
|
+
require 'oci8/cursor.rb'
|
94
107
|
require 'oci8/bindtype.rb'
|
95
108
|
require 'oci8/metadata.rb'
|
96
109
|
require 'oci8/compat.rb'
|