On Jun 3, 2007, at 10:49 AM, Christoph Haas wrote:
> > On Sat, Jun 02, 2007 at 01:09:37PM -0400, Michael Bayer wrote: >> at Mike Orr's prodding, ive worked up a SQLAlchemy context object >> based on his proposal for a facade that deals with the various >> session >> (context)/engine/metadata mixtures. I think this would be a good >> idea for the very reason that it encapsulates all the details of how >> engines/metadata/session/etc get created and used. [...] >> >> from pylons.database import SAContext >> sac = SAContext() # connects to engine in the .ini file by default >> [...] > > I like your prosal a lot. It addresses everything that has annoyed > me so > far. But why is it limited to pylons.database? Elixir tries to make SA > simpler. Can't the session context itself be jazzed up so thar > pylons.database does little more than read the sqlalchemy.dburi and > provide a session context? i consider this facade to be a framework feature. it has an opinion about how things should be organized. SA itself isnt a framework and doesnt want strong opinions about how things should be organized, and SessionContext is just a small building block towards an end-user solution. im pretty sure making a rich facade out of SessionContext would throw the zalchemy guys for a loop, for example. thats not to say SAContext cant be bundled with SQLAlchemy though but at the moment it "feels" like it should be part of pylons. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
