v1.2.0 - Show latest stable - 0 notes - Superclass: ActiveRecord::ConnectionAdapters::AbstractAdapter

This is an Oracle/OCI adapter for the ActiveRecord persistence framework. It relies upon the OCI8 driver, which works with Oracle 8i and above. Most recent development has been on Debian Linux against a 10g database, ActiveRecord 1.12.1 and OCI8 0.1.13. See: http://rubyforge.org/projects/ruby-oci8/

Usage notes:

  • Key generation assumes a "${table_name}_seq" sequence is available for all tables; the sequence name can be changed using ActiveRecord::Base.set_sequence_name. When using Migrations, these sequences are created automatically.
  • Oracle uses DATE or TIMESTAMP datatypes for both dates and times. Consequently some hacks are employed to map data back to Date or Time in Ruby. If the column_name ends in _time it’s created as a Ruby <a href="/rails/Time">Time</a>. Else if the hours/minutes/seconds are 0, I make it a Ruby <a href="/rails/Date">Date</a>. Else it’s a Ruby <a href="/rails/Time">Time</a>. This is a bit nasty - but if you use Duck Typing you’ll probably not care very much. In 9i and up it’s tempting to map DATE to Date and TIMESTAMP to Time, but too many databases use DATE for both. Timezones and sub-second precision on timestamps are not supported.
  • Default values that are functions (such as "SYSDATE") are not supported. This is a restriction of the way ActiveRecord supports default values.
  • Support for Oracle8 is limited by Rails' use of ANSI join syntax, which is supported in Oracle9i and later. You will need to use #finder_sql for has_and_belongs_to_many associations to run against Oracle8.

Required parameters:

  • :username
  • :password
  • :database
Show files where this class is defined (1 file)
Register or log in to add new notes.