« Return to Thread: Sqlite 3 adapter

Re: Sqlite 3 adapter

by Nick Sieger-2 :: Rate this Message:

Reply to Author | View in Thread

On Mon, Apr 21, 2008 at 9:51 PM, Joseph Athman <jjathman@...> wrote:

> I started playing around with this some.  I found what seems like a
> reasonable JDBC Driver at http://www.zentus.com/sqlitejdbc/
>
> I do have some basic questions though.  Why does the H2 adapter not have a
> jdbc_adapter file like jdbc_h2.rb?  It seems like it uses the jdbc_hsqldb.rb
> file.    Are the H2 and HSBLDB adapters bad examples to look at?  I'm just
> trying to figure out what I need to do to get it working.  It seems like I
> have migrations at least partially working and I can perform selects, but it
> looks like creates are failing.
>

Cool. Yeah, sorry there isn't a HOWTO for porting a new adapter yet.
The basic approach is to do a few things:

- new lib/jdbc_adapter/jdbc_sqlite.rb -- follow constant naming
conventions inside according to others. 'jdbc_adapter/jdbc_sqlite'
needs to be required in
lib/active_record/connection_adapters/jdbc_adapter_spec.rb (probably
should be in a better place)
- new test/sqlite_simple_test.rb + test/db/sqlite.rb -- follow other
existing ones as well
- new rake task in the rake file to run the tests, if you desire.

 /Nick

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: Sqlite 3 adapter