ruby-oci8 2.1.4 → 2.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +1 -0
- data/ChangeLog +67 -0
- data/NEWS +21 -0
- data/VERSION +1 -1
- data/docs/platform-specific-issues.md +4 -24
- data/ext/oci8/extconf.rb +2 -1
- data/ext/oci8/lob.c +39 -26
- data/ext/oci8/object.c +25 -1
- data/ext/oci8/oci8.c +12 -42
- data/ext/oci8/oci8.h +1 -3
- data/ext/oci8/oci8lib.c +8 -0
- data/ext/oci8/ocihandle.c +167 -188
- data/ext/oci8/oraconf.rb +3 -2
- data/lib/oci8.rb.in +1 -1
- data/lib/oci8/metadata.rb +59 -67
- data/lib/oci8/object.rb +0 -1
- data/lib/oci8/oci8.rb +35 -35
- data/lib/oci8/oracle_version.rb +7 -14
- data/ruby-oci8.gemspec +31 -26
- data/test/test_bind_time.rb +2 -2
- data/test/test_connection_pool.rb +2 -2
- data/test/test_metadata.rb +0 -2
- data/test/test_object.rb +0 -1
- data/test/test_oci8.rb +10 -2
- metadata +4 -4
data/test/test_bind_time.rb
CHANGED
@@ -83,8 +83,8 @@ class TestBindTime < Test::Unit::TestCase
|
|
83
83
|
|
84
84
|
def test_get_day
|
85
85
|
cursor = @conn.parse("BEGIN :time := TO_DATE('200101' || TO_CHAR(:day, 'FM00'), 'YYYYMMDD'); END;")
|
86
|
-
|
87
|
-
|
86
|
+
cursor.bind_param(:day, Fixnum)
|
87
|
+
cursor.bind_param(:time, Time)
|
88
88
|
DAY_CHECK_TARGET.each do |i|
|
89
89
|
# set time via oracle.
|
90
90
|
cursor[:day] = i;
|
@@ -76,7 +76,7 @@ class TestConnectionPool < Test::Unit::TestCase
|
|
76
76
|
threads = []
|
77
77
|
(min_cnt + 1).times do |n|
|
78
78
|
threads << Thread.start do
|
79
|
-
conns[n].exec "BEGIN DBMS_LOCK.SLEEP(
|
79
|
+
conns[n].exec "BEGIN DBMS_LOCK.SLEEP(5); END;"
|
80
80
|
end
|
81
81
|
end
|
82
82
|
sleep(0.5)
|
@@ -86,7 +86,7 @@ class TestConnectionPool < Test::Unit::TestCase
|
|
86
86
|
# Execute blocking SQL statements parallel up to maximum.
|
87
87
|
(min_cnt + 1).upto(max_cnt - 1) do |n|
|
88
88
|
threads << Thread.start do
|
89
|
-
conns[n].exec "BEGIN DBMS_LOCK.SLEEP(
|
89
|
+
conns[n].exec "BEGIN DBMS_LOCK.SLEEP(4); END;"
|
90
90
|
end
|
91
91
|
end
|
92
92
|
sleep(0.5)
|
data/test/test_metadata.rb
CHANGED
@@ -894,7 +894,6 @@ EOS
|
|
894
894
|
assert_equal(2, desc[0].arguments.length)
|
895
895
|
assert_instance_of(OCI8::Metadata::Argument, desc[0].arguments[0])
|
896
896
|
|
897
|
-
descs = @conn.describe_package('test_pkg').subprograms
|
898
897
|
assert_instance_of(OCI8::Metadata::Procedure, desc[1])
|
899
898
|
assert_equal(nil, desc[1].obj_id)
|
900
899
|
assert_equal('TEST_PROC', desc[1].obj_name)
|
@@ -994,7 +993,6 @@ EOS
|
|
994
993
|
assert_equal(3, desc[0].arguments.length)
|
995
994
|
assert_instance_of(OCI8::Metadata::Argument, desc[0].arguments[0])
|
996
995
|
|
997
|
-
descs = @conn.describe_package('test_pkg').subprograms
|
998
996
|
assert_instance_of(OCI8::Metadata::Function, desc[1])
|
999
997
|
assert_equal(nil, desc[1].obj_id)
|
1000
998
|
assert_equal('TEST_FUNC', desc[1].obj_name)
|
data/test/test_object.rb
CHANGED
data/test/test_oci8.rb
CHANGED
@@ -202,7 +202,7 @@ EOS
|
|
202
202
|
plsql.bind_param(':cursor', nil, OCI8::Cursor)
|
203
203
|
plsql.exec
|
204
204
|
cursor = plsql[':cursor']
|
205
|
-
cursor.define(5,
|
205
|
+
cursor.define(5, DateTime) # define 5th column as DateTime
|
206
206
|
cursor.define(6, Date) # define 6th column as Date
|
207
207
|
cursor.define(7, Integer) # define 7th column as Integer
|
208
208
|
cursor.define(8, Bignum) # define 8th column as Integer
|
@@ -221,7 +221,7 @@ EOS
|
|
221
221
|
tm = Time.local(2000 + i, 8, 3, 23, 59, 59)
|
222
222
|
dt = Date.civil(2000 + i, 8, 3)
|
223
223
|
assert_equal(tm, rv[3])
|
224
|
-
assert_equal(
|
224
|
+
assert_equal(dttm, rv[4])
|
225
225
|
assert_equal(dt, rv[5])
|
226
226
|
end
|
227
227
|
assert_equal(i, rv[6])
|
@@ -478,4 +478,12 @@ EOS
|
|
478
478
|
# OCI_ATTR_MEMPOOL_SIZE
|
479
479
|
assert_equal(0, OCI8.send(:class_variable_get, :@@process_handle).send(:attr_get_ub4, 88))
|
480
480
|
end
|
481
|
+
|
482
|
+
def test_client_driver_name
|
483
|
+
if OCI8.oracle_client_version >= OCI8::ORAVER_11_1 and @conn.oracle_server_version >= OCI8::ORAVER_11_1
|
484
|
+
sid = @conn.select_one("select userenv('sid') from dual")[0].to_i
|
485
|
+
driver_name = @conn.select_one('select client_driver from v$session_connect_info where sid = :1', sid)[0]
|
486
|
+
assert_equal('rubyoci8', driver_name)
|
487
|
+
end
|
488
|
+
end
|
481
489
|
end # TestOCI8
|
metadata
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-oci8
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
|
-
-
|
8
|
+
- Kubo Takehiro
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-09 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! 'ruby-oci8 is a ruby interface for Oracle using OCI8 API. It is available
|
15
|
-
with
|
15
|
+
with Oracle8i, Oracle9i, Oracle10g, Oracle11g and Oracle Instant Client.
|
16
16
|
|
17
17
|
'
|
18
18
|
email: kubo@jiubao.org
|