[Nitro] [PATCH] og-psql-refactoring
bryan.a.soto at gmail.com
Sun Apr 9 03:52:29 EDT 2006
The attached bundle contains one patch that has some rather drastic
changes to the postgres sql store. It passes the test suite except for
one failure addressed in a different email. Could someone that has an
existing app in postgres _please_ test this? I don't have a Postgres
app, so I can verify that it's backwards compatible. I can check
against Mysql and Sqlite, but not Postgres.
I'd really appreciate if someone could give this a try. I'd rather
throw away the last patch if it isn't backward compatible.
Thanks for your help.
Patch modifies the way Postgres accesses join table info to match other stores.
Makes PsqlStore#eval_og_allocate use the same logic as
SqlStore#eval_og_allocate when determining if a class is STI.
Modifies the query used for Tag selection. Uses subqueries. Passes
tests on Mysql, Postgres and Sqlite.
In PGResult, makes next and each row match the interface used by the
other stores so that SqlStore works properly when calling these
methods for PsqlStore.
Removes read_prop, eval_og_insert, eval_og_allocate and read_row
methods from psql.rb in favor of the methods defined in the superclass
Postgres doesn't appear to support autoincrement, so added a new
method to SqlStore, generate_key. Postgres uses this to generate the
oid value to be inserted. SqlStore defines this method as returning
NULL which allows the other stores to autoincrement. This can possibly
be extended to allow custom key generation for all the stores.
"Never tell people how to do things. Tell them what to do and they
will surprise you with their ingenuity." —General George S. Patton
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 15048 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060409/495c6d89/attachment.zip
More information about the Nitro-general