[ANN] ruby-oci8 1.0.6 and 2.0.2

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

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

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 Herzhauser 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

  - OCI8#select_one(sql, *bindvars) -> first_row

  - OCI8#ping -> true or false

    Verifies that the Oracle connection is alive.
    OCI8#ping also can be used to flush all the pending OCI
    client-side calls to the server if any exist.

  - OCI8#client_identifier = client_id

    Look at the following link to know what is the client identifier.
      http://it.toolbox.com/blogs/database-solutions/oracle-session-tracing-part-i-16356

    Note that the specified identifier doesn't change the v$session
    immediately. It is done by the next network round trip
    such as OCI8#exec or OCI8#ping.

* 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 Herzhauser)

* fix an error when executing "select NULL from dual".
  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.

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

···

On Sun, May 17, 2009 at 10:25 AM, KUBO Takehiro <kubo@jiubao.org> wrote:

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

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

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 Herzhauser 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

- OCI8#select_one(sql, *bindvars) -> first_row

- OCI8#ping -> true or false

   Verifies that the Oracle connection is alive.
   OCI8#ping also can be used to flush all the pending OCI
   client-side calls to the server if any exist.

- OCI8#client_identifier = client_id

   Look at the following link to know what is the client identifier.

http://it.toolbox.com/blogs/database-solutions/oracle-session-tracing-part-i-16356

   Note that the specified identifier doesn't change the v$session
   immediately. It is done by the next network round trip
   such as OCI8#exec or OCI8#ping.

* 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 Herzhauser)

* fix an error when executing "select NULL from dual".
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.

Hi,

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

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

···

On Mon, May 18, 2009 at 6:06 AM, James Herdman <james.herdman@gmail.com> wrote: