ruby-oci8 2.1.2 → 2.1.3
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/ext/oci8/apiwrap.c.tmpl +5 -5
- data/ext/oci8/attr.c +1 -42
- data/ext/oci8/bind.c +5 -2
- data/ext/oci8/connection_pool.c +2 -2
- data/ext/oci8/encoding.c +18 -12
- data/ext/oci8/env.c +1 -1
- data/ext/oci8/extconf.rb +15 -12
- data/ext/oci8/lob.c +19 -2
- data/ext/oci8/oci8.c +69 -52
- data/ext/oci8/oci8.h +31 -18
- data/ext/oci8/oci8lib.c +73 -40
- data/ext/oci8/ocihandle.c +7 -2
- data/ext/oci8/ocinumber.c +5 -5
- data/ext/oci8/stmt.c +66 -368
- data/ext/oci8/thread_util.c +3 -3
- data/ext/oci8/thread_util.h +1 -1
- 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/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 +10 -3
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/ext/oci8/apiwrap.c.tmpl
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
%>
|
5
5
|
#define API_WRAP_C 1
|
6
6
|
#include "apiwrap.h"
|
7
|
-
#ifdef
|
7
|
+
#ifdef NATIVE_THREAD_WITH_GVL
|
8
8
|
#define BLOCKING_FUNCTION_EPILOGUE(svcctx) do { (svcctx)->executing_thread = Qnil; } while (0)
|
9
9
|
#else
|
10
10
|
#define BLOCKING_FUNCTION_EPILOGUE(svcctx) do { } while (0)
|
@@ -54,7 +54,7 @@ int oci8_have_<%=f.name%>_nb;
|
|
54
54
|
#endif
|
55
55
|
|
56
56
|
#if defined RUNTIME_API_CHECK || ORACLE_CLIENT_VERSION >= <%=f.version_num%>
|
57
|
-
static
|
57
|
+
static void *oci8_<%=f.name%>_cb(void *user_data)
|
58
58
|
{
|
59
59
|
oci8_<%=f.name%>_data_t *data = (oci8_<%=f.name%>_data_t *)user_data;
|
60
60
|
<% if f.ret == 'void'
|
@@ -64,10 +64,10 @@ static VALUE oci8_<%=f.name%>_cb(void *user_data)
|
|
64
64
|
<% end %>
|
65
65
|
<% if f.ret == 'sword'
|
66
66
|
%> BLOCKING_FUNCTION_EPILOGUE(data->svcctx);
|
67
|
-
return (VALUE)data->rv;
|
67
|
+
return (void*)(VALUE)data->rv;
|
68
68
|
<% else
|
69
69
|
%> BLOCKING_FUNCTION_EPILOGUE(data->svcctx);
|
70
|
-
return
|
70
|
+
return NULL;
|
71
71
|
<% end %>
|
72
72
|
}
|
73
73
|
#else
|
@@ -82,7 +82,7 @@ static VALUE oci8_<%=f.name%>_cb(void *user_data)
|
|
82
82
|
<% f.args.each do |a|
|
83
83
|
%> data.<%=a.name%> = <%=a.name%>;
|
84
84
|
<% end
|
85
|
-
%>
|
85
|
+
%> oci8_call_without_gvl(svcctx, oci8_<%=f.name%>_cb, &data);
|
86
86
|
<% if f.ret != 'void'
|
87
87
|
%> return data.rv;
|
88
88
|
<% end
|
data/ext/oci8/attr.c
CHANGED
@@ -2,19 +2,10 @@
|
|
2
2
|
/*
|
3
3
|
* attr.c
|
4
4
|
*
|
5
|
-
* Copyright (C) 2002-
|
5
|
+
* Copyright (C) 2002-2012 KUBO Takehiro <kubo@jiubao.org>
|
6
6
|
*/
|
7
7
|
#include "oci8.h"
|
8
8
|
|
9
|
-
VALUE oci8_get_sb1_attr(oci8_base_t *base, ub4 attrtype, OCIStmt *stmtp)
|
10
|
-
{
|
11
|
-
sb1 val;
|
12
|
-
|
13
|
-
chker3(OCIAttrGet(base->hp.ptr, base->type, &val, NULL, attrtype, oci8_errhp),
|
14
|
-
base, stmtp);
|
15
|
-
return INT2FIX(val);
|
16
|
-
}
|
17
|
-
|
18
9
|
VALUE oci8_get_ub2_attr(oci8_base_t *base, ub4 attrtype, OCIStmt *stmtp)
|
19
10
|
{
|
20
11
|
ub2 val;
|
@@ -24,38 +15,6 @@ VALUE oci8_get_ub2_attr(oci8_base_t *base, ub4 attrtype, OCIStmt *stmtp)
|
|
24
15
|
return INT2FIX(val);
|
25
16
|
}
|
26
17
|
|
27
|
-
VALUE oci8_get_sb2_attr(oci8_base_t *base, ub4 attrtype, OCIStmt *stmtp)
|
28
|
-
{
|
29
|
-
sb2 val;
|
30
|
-
|
31
|
-
chker3(OCIAttrGet(base->hp.ptr, base->type, &val, NULL, attrtype, oci8_errhp),
|
32
|
-
base, stmtp);
|
33
|
-
return INT2FIX(val);
|
34
|
-
}
|
35
|
-
|
36
|
-
VALUE oci8_get_ub4_attr(oci8_base_t *base, ub4 attrtype, OCIStmt *stmtp)
|
37
|
-
{
|
38
|
-
ub4 val;
|
39
|
-
|
40
|
-
chker3(OCIAttrGet(base->hp.ptr, base->type, &val, NULL, attrtype, oci8_errhp),
|
41
|
-
base, stmtp);
|
42
|
-
#if SIZEOF_LONG > 4
|
43
|
-
return LONG2FIX(val);
|
44
|
-
#else
|
45
|
-
return ULONG2NUM(val);
|
46
|
-
#endif
|
47
|
-
}
|
48
|
-
|
49
|
-
VALUE oci8_get_string_attr(oci8_base_t *base, ub4 attrtype, OCIStmt *stmtp)
|
50
|
-
{
|
51
|
-
text *val;
|
52
|
-
ub4 size;
|
53
|
-
|
54
|
-
chker3(OCIAttrGet(base->hp.ptr, base->type, &val, &size, attrtype, oci8_errhp),
|
55
|
-
base, stmtp);
|
56
|
-
return rb_external_str_new_with_enc(TO_CHARPTR(val), size, oci8_encoding);
|
57
|
-
}
|
58
|
-
|
59
18
|
#define MAX_ROWID_LEN 128
|
60
19
|
|
61
20
|
typedef struct {
|