oci_adapter.rb

Path: vendor/rails/activerecord/lib/active_record/connection_adapters/oci_adapter.rb
Last Update: Thu Aug 04 22:20:26 UTC 2005

Implementation notes:

  1. I had to redefine a method in ActiveRecord to make it possible to implement an autonumbering solution for oracle. It’s implemented in a way that is intended to not break other adapters.
  2. Default value support needs a patch to the OCI8 driver, to enable it to read LONG columns. The driver-author has said he will add this in a future release. A similar patch is needed for TIMESTAMP. This should be replaced with the 0.2 version of the driver, which will support TIMESTAMP properly.
  3. Large Object support works by an after_save callback added to the ActiveRecord. This is not a problem - you can add other (chained) after_save callbacks.
  4. LIMIT and OFFSET now work using a select from select from select. This pattern enables the middle select to limit downwards as much as possible, before the outermost select limits upwards. The extra rownum column is stripped from the results. See asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:127412348064

Do what you want with this code, at your own peril, but if any significant portion of my code remains then please acknowledge my contribution. Copyright 2005 Graham Jenkins $Revision: 1.2 $

Required files

active_record/connection_adapters/abstract_adapter  

[Validate]