Forum: Ruby on Rails New Database Adapter: OpenBase

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Derrick S. (Guest)
on 2006-01-06 17:00
(Received via mailing list)
Greetings to all!

I've decided to begin my journey into Ruby generally, and Rails
specifically, by writing a new database adapter for OpenBase.  It's
nearly complete, but I've run into a small issue:

In OpenBase, you cannot override a default value with a NULL during
an INSERT.  OpenBase detects the null value and chooses the default
instead.  This means that my adapter is not passing the
test_default_values_on_empty_strings(BasicTest).

I need to first execute the INSERT, then send an UPDATE to nullify
the necessary attributes.  Is this something I should do at the
adapter level, or should it perhaps go into the ActiveRecord?  Since
it seems that the other 8 database servers do not have this behavior,
I'm thinking this belongs in the #insert on my adapter.

Any comments, suggestions...?


-Derrick

"Perl's grammar can not be reduced to BNF.
The work of parsing perl is distributed between
yacc, the lexer, smoke and mirrors.''
-Chaim Frenkel
This topic is locked and can not be replied to.