ruby-oci8 1.0.2-i386-mswin32 → 1.0.3-i386-mswin32

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,38 @@
1
+ 2008-08-10 KUBO Takehiro <kubo@jiubao.org>
2
+ * NEWS: add changes between 1.0.2 and 1.0.3.
3
+ * VERSION: change version to 1.0.3.
4
+ * ext/oci8/lob.c: add workaround code for a losing character problem
5
+ when reading CLOB. The problem is happened at the following condition.
6
+ 1. Oracle client version is 10.2.0.4 or 11.1.0.6.
7
+ (It doesn't depend on Oracle server version.)
8
+ 2. The character set is a variable-length one (e.g. AL32UTF8).
9
+ (This probmem was reported by Efren Yevale and Thomas Witt and
10
+ fixed with Thomas Witt's help.)
11
+
12
+ 2008-08-09 KUBO Takehiro <kubo@jiubao.org>
13
+ * ext/oci8/lob.c: fix OCILobLocator#getLength for a lob over 1GB,
14
+ which affect OCI8::LOB#size and OCI8::LOB#read. fix
15
+ OCILobLocator#read and OCILobLocator#write to set offset over 2BG,
16
+ which affect OCI8::LOB#read and OCI8::LOB#write.
17
+ (This probmem was reported by Jonathan Hadders.)
18
+
19
+ 2008-07-12 KUBO Takehiro <kubo@jiubao.org>
20
+ * lib/oci8.rb.in: (1) add #to_json to OraDate too.
21
+ (2) fix a bug when using Oracle 8i and dbd. OCI_ATTR_FSPRECISION
22
+ is for TIMESTAMP data type which is new in Oracle 9i.
23
+ (This probmem was reported by Glauco Magnelli.)
24
+
25
+ 2008-07-07 KUBO Takehiro <kubo@jiubao.org>
26
+ * lib/oci8.rb.in: fix the problem that OraNumber#to_json returns
27
+ "{}" when using Rails. (This issue is reported by Alex Moore)
28
+ Object#to_json is added by active_support. But active_support
29
+ doesn't know what OraNumber is.
30
+ * ext/oci8/oraconf.rb: merge chages in ruby-oci8 trunk.
31
+
32
+ 2008-07-05 KUBO Takehiro <kubo@jiubao.org>
33
+ * ext/oci8/oraconf.rb: prints more information on checking
34
+ LD_LIBRARY_PATH.
35
+
1
36
  2008-06-26 KUBO Takehiro <kubo@jiubao.org>
2
37
  * NEWS: add changes between 1.0.1 and 1.0.2.
3
38
  * VERSION: change version to 1.0.2.
data/NEWS CHANGED
@@ -1,3 +1,29 @@
1
+ 1.0.3:
2
+
3
+ 1. add workaround code for a losing character problem when reading CLOB.
4
+ (reported by Efren Yevale and Thomas Witt and fixed with Thomas Witt's help.)
5
+
6
+ The problem is happened at the following condition.
7
+
8
+ (a) Oracle client version is 10.2.0.4 or 11.1.0.6.
9
+ It doesn't happend when using 10.2.0.3 client or lower.
10
+ It doesn't depend on Oracle server version.
11
+
12
+ (b) The character set is a variable-length one.
13
+ e.g. AL32UTF8
14
+
15
+ 2. fix a problem when reading BLOB/CLOB over 1GB.
16
+ (reported by Jonathan Hadders.)
17
+
18
+ 3. [rails] fix a problem that OraNumber#to_json returns "{}" when using Rails.
19
+ (reported by Alex Moore)
20
+
21
+ Rails add to_json method. But it doesn't know what OraNumber is.
22
+ OraNumber#to_json is added for Rails.
23
+
24
+ 4. [dbi] fix a problem when using Oracle 8i and ruby-dbi.
25
+ (reported by Glauco MagnelliRemi Gagnon.)
26
+
1
27
  1.0.2:
2
28
 
3
29
  1. add a gemspec file.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.2
1
+ 1.0.3
Binary file
@@ -55,7 +55,7 @@ class OCI8
55
55
  @@error_in_initialization = $!
56
56
  end
57
57
 
58
- VERSION = '1.0.2'
58
+ VERSION = '1.0.3'
59
59
  CLIENT_VERSION = '1020'
60
60
  # :stopdoc:
61
61
  RAW = OCI_TYPECODE_RAW
@@ -1293,6 +1293,10 @@ class OraDate
1293
1293
  out.scalar(taguri, self.to_s, :plain)
1294
1294
  end
1295
1295
  end
1296
+
1297
+ def to_json(options=nil) # :nodoc:
1298
+ to_datetime.to_json(options)
1299
+ end
1296
1300
  end
1297
1301
 
1298
1302
  class OraNumber
@@ -1305,6 +1309,10 @@ class OraNumber
1305
1309
  out.scalar(taguri, self.to_s, :plain)
1306
1310
  end
1307
1311
  end
1312
+
1313
+ def to_json(options=nil) # :nodoc:
1314
+ to_s
1315
+ end
1308
1316
  end
1309
1317
 
1310
1318
 
@@ -1564,6 +1572,12 @@ class OCI8
1564
1572
  attr_reader :scale
1565
1573
 
1566
1574
  # interval
1575
+ if defined? OCI_ATTR_FSPRECISION and defined? OCI_ATTR_LFPRECISION
1576
+ # Oracle 8i or upper has OCI_ATTR_FSPRECISION and OCI_ATTR_LFPRECISION
1577
+ @@is_fsprecision_available = true
1578
+ else
1579
+ @@is_fsprecision_available = false
1580
+ end
1567
1581
  attr_reader :fsprecision
1568
1582
  attr_reader :lfprecision
1569
1583
 
@@ -1588,8 +1602,22 @@ class OCI8
1588
1602
  when 5; :lit_null
1589
1603
  else raise "unknown charset_form #{param.attrGet(OCI_ATTR_CHARSET_FORM)}"
1590
1604
  end
1591
- @fsprecision = param.attrGet(OCI_ATTR_FSPRECISION)
1592
- @lfprecision = param.attrGet(OCI_ATTR_LFPRECISION)
1605
+
1606
+ @fsprecision = nil
1607
+ @lfprecision = nil
1608
+ if @@is_fsprecision_available
1609
+ begin
1610
+ @fsprecision = param.attrGet(OCI_ATTR_FSPRECISION)
1611
+ @lfprecision = param.attrGet(OCI_ATTR_LFPRECISION)
1612
+ rescue OCIError
1613
+ raise if $!.code != 24316 # ORA-24316: illegal handle type
1614
+ # Oracle 8i could not use OCI_ATTR_FSPRECISION and
1615
+ # OCI_ATTR_LFPRECISION even though it defines these
1616
+ # constants in oci.h.
1617
+ @@is_fsprecision_available = false
1618
+ end
1619
+ end
1620
+
1593
1621
  @type_string = __type_string(param)
1594
1622
  end
1595
1623
 
@@ -1293,6 +1293,10 @@ class OraDate
1293
1293
  out.scalar(taguri, self.to_s, :plain)
1294
1294
  end
1295
1295
  end
1296
+
1297
+ def to_json(options=nil) # :nodoc:
1298
+ to_datetime.to_json(options)
1299
+ end
1296
1300
  end
1297
1301
 
1298
1302
  class OraNumber
@@ -1305,6 +1309,10 @@ class OraNumber
1305
1309
  out.scalar(taguri, self.to_s, :plain)
1306
1310
  end
1307
1311
  end
1312
+
1313
+ def to_json(options=nil) # :nodoc:
1314
+ to_s
1315
+ end
1308
1316
  end
1309
1317
 
1310
1318
 
@@ -1564,6 +1572,12 @@ class OCI8
1564
1572
  attr_reader :scale
1565
1573
 
1566
1574
  # interval
1575
+ if defined? OCI_ATTR_FSPRECISION and defined? OCI_ATTR_LFPRECISION
1576
+ # Oracle 8i or upper has OCI_ATTR_FSPRECISION and OCI_ATTR_LFPRECISION
1577
+ @@is_fsprecision_available = true
1578
+ else
1579
+ @@is_fsprecision_available = false
1580
+ end
1567
1581
  attr_reader :fsprecision
1568
1582
  attr_reader :lfprecision
1569
1583
 
@@ -1588,8 +1602,22 @@ class OCI8
1588
1602
  when 5; :lit_null
1589
1603
  else raise "unknown charset_form #{param.attrGet(OCI_ATTR_CHARSET_FORM)}"
1590
1604
  end
1591
- @fsprecision = param.attrGet(OCI_ATTR_FSPRECISION)
1592
- @lfprecision = param.attrGet(OCI_ATTR_LFPRECISION)
1605
+
1606
+ @fsprecision = nil
1607
+ @lfprecision = nil
1608
+ if @@is_fsprecision_available
1609
+ begin
1610
+ @fsprecision = param.attrGet(OCI_ATTR_FSPRECISION)
1611
+ @lfprecision = param.attrGet(OCI_ATTR_LFPRECISION)
1612
+ rescue OCIError
1613
+ raise if $!.code != 24316 # ORA-24316: illegal handle type
1614
+ # Oracle 8i could not use OCI_ATTR_FSPRECISION and
1615
+ # OCI_ATTR_LFPRECISION even though it defines these
1616
+ # constants in oci.h.
1617
+ @@is_fsprecision_available = false
1618
+ end
1619
+ end
1620
+
1593
1621
  @type_string = __type_string(param)
1594
1622
  end
1595
1623
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  Summary: ruby interface for Oracle using OCI8 API
5
5
  Name: ruby-oci8
6
- Version: 1.0.2
6
+ Version: 1.0.3
7
7
  Release: 1%{?dist}
8
8
  Group: Development/Libraries
9
9
  License: Ruby License
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.2
2
+ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: ruby-oci8
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.2
7
- date: 2008-06-29 00:00:00 +09:00
6
+ version: 1.0.3
7
+ date: 2008-08-10 00:00:00 +09:00
8
8
  summary: Ruby interface for Oracle using OCI8 API
9
9
  require_paths:
10
10
  - lib