From: KUBO Takehiro Date: 2009-05-18T07:33:23+09:00 Subject: Re: [ANN] ruby-oci8 1.0.6 and 2.0.2 Hi, On Mon, May 18, 2009 at 6:06 AM, James Herdman 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 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