[Nitro] Og, adapting postgresql to reorgnaization

Judson Lester nyarly at gmail.com
Wed Feb 21 13:49:04 EST 2007


I just sent George a patch to fix that issue.  Basically, the SQL for
inserts and updates is pulled out to a method in SqlStore, so that
Postgres overrides that.

As a sidenote, I altered the last_insert_id so that it returns
currval(#{seq}) and explicitly put a nextval() in the insert_sql
method.  Which looks right to me...

Judson

On 2/21/07, Jonathan Buch <john at oxyliquit.de> wrote:
> Hi,
>
> just trying to get postgresql and sqlite working fully with the
> reorganized Og by Judson Lester (I hope you read this).
>
> I've got it running so far, but hit a wall with overriding og_insert().
>
> Postgresql needs differently ordered og_insert (first
> .last_insert_id and then .exec("INSERT")  )
>
> First I just overrode the original og_insert, psql works fine, all
> testcases go green.
>
> But this prevents different og_insert implementations for different
> stores.  Now my question:  how do we best provide a way (for store
> creators) to override specific functions?
>
> Jo
>
> --
> Feel the love
> http://pinkjuice.com/pics/ruby.png
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>


More information about the Nitro-general mailing list