# Ruby-oci8 1.0.6 and 2.0.2

**URL:** <https://www.ruby-forum.com/t/ruby-oci8-1-0-6-and-2-0-2/168170>\
**Category:** Ruby\
**Created:** [May 17, 2009, 4:26pm UTC](https://www.ruby-forum.com/t/ruby-oci8-1-0-6-and-2-0-2/168170 "2009-05-17T16:26:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kubo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8edcca/32.png) [@kubo](https://www.ruby-forum.com/u/kubo)\
**Post date:** [May 17, 2009, 4:26pm UTC](https://www.ruby-forum.com/t/ruby-oci8-1-0-6-and-2-0-2/168170/1 "2009-05-17T16:26:49Z")

</div>

Ruby-oci8 1.0.6 and 2.0.2 are released. These are Oracle modules using  
OCI8 API.

[http://rubyforge.org/projects/ruby-oci8/](http://rubyforge.org/projects/ruby-oci8/)

Ruby-oci8 1.0.6 is a latest stable release. The target ruby version  
is 1.8. It doesn’t work with ruby 1.9.

Ruby-oci8 2.0.2 is an unstable release. It works on both ruby 1.8 and  
1.9 and has usefull features compared with ruby-oci8 1.0.6.  
Note: Active record oracle adapter doesn’t work with 2.0.2.  
Use Active record oracle\_enhanced adapter instead.  
[http://rubyforge.org/projects/oracle-enhanced](http://rubyforge.org/projects/oracle-enhanced)

What’s new in 1.0.6.

- fix a problem when compiling for Oracle 8.0.  
(reported by Axel Reinhold as a ruby-oci8 2.0 issue)

- [dbi] fix to pass a newly added sanity check in dbi 0.4.1.  
(reported by Dirk H. as a ruby-oci8 2.0 issue)

- [dbi] fix dbh#columns for Oracle 8.1 or lower.  
The data dictionary all\_constraints doesn’t have index\_name  
column on Oracle 8i. Rewrite DBI::DBD::OCI8::Database#columns  
by using all\_cons\_columns.  
(backport from ruby-oci8 trunk)

What’s new in 2.0.2.

- add new methods

- fix problems when compiling with Oracle 9.2 and 8.0.  
(reported by Axel Reinhold)

- [dbi] fix to pass a newly added sanity check in dbi 0.4.1.  
(reported by Dirk H.)

- fix an error when executing “select NULL from dual”.  
[http://rubyforge.org/forum/forum.php?thread\_id=32468&forum\_id=1078](http://rubyforge.org/forum/forum.php?thread_id=32468&forum_id=1078)  
(contributed by Raimonds Simanovskis)

- [ruby 1.9] fix OCI8::BLOB to read/write binary. Prior to 2.0.1,  
it was treated as text tagged with NLS\_LANG encoding.

- [ruby 1.9] fix to bind string data by the length got from  
String#bytesize  
converted to OCI8.encoding, not by String#size.

---

<div class="post-metadata">

**Author:** ![kubo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8edcca/32.png) [@kubo](https://www.ruby-forum.com/u/kubo)\
**Post date:** [May 17, 2009, 11:07pm UTC](https://www.ruby-forum.com/t/ruby-oci8-1-0-6-and-2-0-2/168170/2 "2009-05-17T23:07:19Z")

</div>

I’m looking forward to trying this out!

I have a question though. I’ve noticed you have a few objects like  
OraDate.  
Why have something like OraDate when there’s objects like DateTime that  
more  
or less do the same thing?

James

---

<div class="post-metadata">

**Author:** ![kubo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8edcca/32.png) [@kubo](https://www.ruby-forum.com/u/kubo)\
**Post date:** [May 18, 2009, 12:33am UTC](https://www.ruby-forum.com/t/ruby-oci8-1-0-6-and-2-0-2/168170/3 "2009-05-18T00:33:54Z")

</div>

Hi,

On Mon, May 18, 2009 at 6:06 AM, James H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I’m looking forward to trying this out!
> 
> I have a question though. I’ve noticed you have a few objects like OraDate.  
> Why have something like OraDate when there’s objects like DateTime that more  
> or less do the same thing?

It is for a historical reason. I started to develop ruby-oci8 about 7  
years ago.  
DateTime wasn’t available at that time.  
See: [http://rubyforge.org/forum/forum.php?thread\_id=2289&forum\_id=1077](http://rubyforge.org/forum/forum.php?thread_id=2289&forum_id=1077)

When fetching DATE, ruby-oci8 1.0 returns OraDate by default. You can  
customize  
it to return DateTime as follows:  
OCI8::BindType::Mapping[OCI8::SQLT\_DAT] = OCI8::BindType::DateTime

On the other hand, ruby-oci8 2.0 returns DateTime by default. OraDate is  
also  
available for backward compatibility by the following setting.  
OCI8::BindType::Mapping[OCI8::SQLT\_DAT] = OCI8::BindType::OraDate
