[Nitro] Og::Store (was Re: og regarding legacy apps table hints)
george.moschovitis at gmail.com
Fri Aug 19 02:03:23 EDT 2005
I am sure everyone will aggree that this looks EXTREMELY promising.
Some minor remarks:
Please try to follow the Og coding conventions, ie:
- leave a blank line after the comments before each method.
- try to make all lines <= 64 chars (but don't go out of the way to
acomplish this, some
longer lines are ok)
I don't like the name device, isn't device just a store?
I would also like to see some none-sql store abstraction.
I 'll work a bit with your code today, and possibly send you some patches.
On 8/19/05, Deborah Hooker <deb at ysabel.org> wrote:
> George Moschovitis wrote:
> >Yeap, as I said, this feature will be available shortly. I am waiting
> >for debora (ysabel) to send me some rather interesting Og patches
> >before I go on...
> (Posting to the list because I suspect people might be curious -- this
> code is not in a state where it's all that useful on its own just yet,
> but is intended to point the way to a new implementation of the
> underlying store layer for Og, supporting composite keys and multiple
> kinds of inheritance (single-table and table-per-class and mixed) and
> easy implementation of new stores. You're welcome to peek at the code
> but the extent of the warranty right now is "If you break it, you get to
> keep the pieces!" at best. Assume this all falls under the Og license.)
> Take a peek at
> http://darcs.ysabel.org/cgi-bin/darcs.cgi/og-store/?c=browse or just do
> a "darcs get http://darcs.ysabel.org/nitro/og-store". (I just
> discovered darcs myself, and I'm really liking it because I do a lot of
> development disconnected on my laptop and being able to sync my local
> repository with a server _trivially_ is REALLY nice.)
> I tried to send email about this this morning but we've been moving our
> colocated server due to issues with our provider, and I made the mistake
> of saying "It looks like email is working again" in my email, and we all
> know how well that summons Murphy.
> TODO has a list of the things I know are missing at the moment, but
> there's enough there to stumble along in both MySQL and KirbyBase and I
> can likely have Postgres and a shot at Oracle pretty quickly. (Need to
> implement sequences to support Oracle.)
> Oh, and for the record, the mysql-specific store implementation is 61
> lines of code, all very simple and straightforward. Postgres will be
> about the same, I believe, possibly a line or two more to make sure that
> it uses "SERIAL" instead of "AUTO_INCREMENT". Here's the three crucial
> method implementations from the mysql-specific code:
> def do_query(sql)
> @connection.query_with_result = true
> @connection.query sql
> def do_exec(sql)
> @connection.query_with_result = false
> @connection.query sql
> def get_last_insertid
> [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ]
> Nitro-general mailing list
> Nitro-general at rubyforge.org
More information about the Nitro-general