Firebird driver

14 views
Skip to first unread message

John W Higgins

unread,
Dec 26, 2008, 11:34:10 PM12/26/08
to seque...@googlegroups.com
Hello everyone,

I've recently built a new sequel driver for the Firebird database which currently works fairly well for me. It's the standard level of roughness for a new driver but it does do the job for me.

Column names are currently all upper case and for table creation both sequences and the triggers for primary key generation are locked into a particular naming convention.

The driver also needs a variant of the Fb ruby driver located here - http://github.com/wishdev/fb/tree/master

The sequel driver is located in my fork here - http://github.com/wishdev/sequel/tree/master

I really like the way sequel is laid out - outside of a single change adding the adapter name to the lib/sequel_core/database.rb file to add in the adapter - everything is located in the firebird.rb file which makes it nice and organized (even if the file itself is a little messy :) ).

Hope someone finds this of use.

John W Higgins
wis...@gmail.com

Jeremy Evans

unread,
Dec 27, 2008, 1:17:22 PM12/27/08
to sequel-talk
On Dec 26, 8:34 pm, "John W Higgins" <wish...@gmail.com> wrote:
> Hello everyone,
>
> I've recently built a new sequel driver for the Firebird database which
> currently works fairly well for me. It's the standard level of roughness for
> a new driver but it does do the job for me.
>
> Column names are currently all upper case and for table creation both
> sequences and the triggers for primary key generation are locked into a
> particular naming convention.
>
> The driver also needs a variant of the Fb ruby driver located here -http://github.com/wishdev/fb/tree/master
>
> The sequel driver is located in my fork here -http://github.com/wishdev/sequel/tree/master
>
> I really like the way sequel is laid out - outside of a single change adding
> the adapter name to the lib/sequel_core/database.rb file to add in the
> adapter - everything is located in the firebird.rb file which makes it nice
> and organized (even if the file itself is a little messy :) ).
>
> Hope someone finds this of use.

I'd definitely like to get this added to the main branch. I'm
currently on vacation, but I should be able to merge your branch when
I get back (around the first week of January).

Jeremy

Jeremy Evans

unread,
Jan 5, 2009, 4:28:34 PM1/5/09
to sequel-talk
On Dec 26 2008, 8:34 pm, "John W Higgins" <wish...@gmail.com> wrote:
> Hello everyone,
>
> I've recently built a new sequel driver for the Firebird database which
> currently works fairly well for me. It's the standard level of roughness for
> a new driver but it does do the job for me.
>
> Column names are currently all upper case and for table creation both
> sequences and the triggers for primary key generation are locked into a
> particular naming convention.

I just had time to have a deeper look at this, and it looks almost fit
for inclusion. Most of the changes I would make are stylistic (to_sym
instead of intern).

> The driver also needs a variant of the Fb ruby driver located here -http://github.com/wishdev/fb/tree/master

Is there a reason they need your variant? Could it be changed to just
monkey patch the official Fb ruby driver (similar to what Sequel does
with MySQL and PostgreSQL)?

I hope to merge this later this week.

Jeremy

John W Higgins

unread,
Jan 5, 2009, 4:48:49 PM1/5/09
to seque...@googlegroups.com
On 1/5/09, Jeremy Evans <jeremy...@gmail.com> wrote:

On Dec 26 2008, 8:34 pm, "John W Higgins" <wish...@gmail.com> wrote:
> Hello everyone,

> The driver also needs a variant of the Fb ruby driver located here -http://github.com/wishdev/fb/tree/master


Is there a reason they need your variant?  Could it be changed to just
monkey patch the official Fb ruby driver (similar to what Sequel does
with MySQL and PostgreSQL)?

I hope to merge this later this week.


A lot of the change could realistically be avoided in the driver and either moved to a monkeypatch or just ignored (like compiler warnings which affect nothing). However the biggest and needed change is to make the "RETURNING" clause work which currently has issues in the existing driver. There is really no way around that one because of the C code modifications.

If you could give me another week to clean things up just slightly....I probably stuck my head out of the gopher hole a little too quick and I'm cleaning up a few things that I've noticed along the way and making things a little nicer internally (following the opts concept rather then listing 5 parameters to a call and such). Also adding a few more convenience methods for trigger creation and such (along the lines of the PostgreSQL adapter).

Jeremy

 

John

Jeremy Evans

unread,
Jan 5, 2009, 5:27:17 PM1/5/09
to sequel-talk
On Jan 5, 1:48 pm, "John W Higgins" <wish...@gmail.com> wrote:
> A lot of the change could realistically be avoided in the driver and either
> moved to a monkeypatch or just ignored (like compiler warnings which affect
> nothing). However the biggest and needed change is to make the "RETURNING"
> clause work which currently has issues in the existing driver. There is
> really no way around that one because of the C code modifications.

If your repository is necessary (and if you need to make modifications
at the C level, it probably is), then that's what Sequel will be
using. I'm not sure if it is documented in the RDoc, but if not,
please add it.

> If you could give me another week to clean things up just slightly....I
> probably stuck my head out of the gopher hole a little too quick and I'm
> cleaning up a few things that I've noticed along the way and making things a
> little nicer internally (following the opts concept rather then listing 5
> parameters to a call and such). Also adding a few more convenience methods
> for trigger creation and such (along the lines of the PostgreSQL adapter).

Sure, take as much time as you need and let me know when you think it
is ready. I might release a 2.8.1 this week then and put the Firebird
adapter in the following release (which will probably be 2.9.0).

Jeremy

Jeremy Evans

unread,
Jan 21, 2009, 6:17:31 PM1/21/09
to sequel-talk
After speaking with John, I went ahead and merged the Firebird
adapter, which brings the number of supported adapters to 13. John
indicated that he may have changes later, but it should work and all
of the specs pass (hopefully they still pass after I changed some
things).

Jeremy
Reply all
Reply to author
Forward
0 new messages