Tuesday 18 December 2007

Oracle and Rails 2.0

Oh well once you think you done, alongs coming testing in a production environment and some extra fun. Turns out no one else appears to be working with Oracle and Rails 2.0 yet.
No one implemented the needed select_rows in svn. Caused a few problems to use the driver in tsting.

In put ended up with a nice custom oracle driver in the end. Need a few minor changes:-
  • Modified mapping to my own likes
    • float <-> binary_double
    • char(1) N/Y <-> boolean
    • text <-> varchar2(2024)
  • Boolean (true t 1 y +) all mapped to true
  • Implemented select_rows
  • added a high/low sequence which I prefer for high insert rates with oracle
the current version of the gem I created is up at http://biorails.org/svn/biorails/contrib/activerecord-oracle-adapter-1.0.0.gem if anyone interested. At present its a work in progress. Need to put on my old oracle DBA hat and look for anyway to improve it. But may help anyone else moving up to 2.0 with a oracle backend in the next few weeks. Would like to use Insert returning for sequences and trigger filled values if possible but will have to have a further look.

Put needed changes on ticket: #10415 in rails dev.

2 comments:

Unknown said...

I also tried to migrate to Rails 2.0 on Oracle and I found an issue with database session store.

Have you tried to store sessions in Oracle database in Rails 2.0?

Dr.Alces said...

may not have seen this as do not store much in session (3x id values in my case). From the link guess this is a old 4k limit for inline save of blog data. Have had this enough in java land in the past.

Will have a look and put in fix if so.