[sqlalchemy] Postgres INHERITS and concrete table inheritance

2009-12-15 Thread Martin Aspeli
Hi, I'm a little unclear about the relationship between SQLAlchemy inheritance (in particular with the declarative extension) and the INHERITS keyword in Postgres. In Postgres, we have this (simplified for the purposes of his mail): CREATE TABLE owner ( id integer NOT NULL, name

[sqlalchemy] Re: Postgres INHERITS and concrete table inheritance

2009-12-15 Thread Martin Aspeli
Hi Michael, Thanks for the quick reply! Michael Bayer wrote: Martin Aspeli wrote: Hi, This kind of works, but there are a few problems: - The 'owners' variable on the Game type only contains Vehicle objects. I'd like it to contain the correct sub-class if possible. When a row

[sqlalchemy] MySQL LOAD DATA INFILE

2007-08-11 Thread Martin Aspeli
Hi all, I have a use case where I need to execute a MySQL LOAD DATA INFILE statement on an SQLAlchemy connection. I've tried this is with an engine using a threadlocal strategy, using engine.scalar() and passing a string that contains the (generated) LOAD DATA INFILE statement. The statement

[sqlalchemy] ANN: collective.lead - a minimalist SQLAlchemy/Zope 2 integration library

2007-05-02 Thread Martin Aspeli
Hi all, I've just released Lead (pun intended), aka collective.lead, a minimalist Zope 2/SQLAlchemy integration package. http://cheeseshop.python.org/pypi/collective.lead There are at least two other Zope2/SA integration packages that I know of - z3c.sqlalchemy and ore.alchemist. Both of

[sqlalchemy] Modifying objects after session.save() but before session.flush()

2007-04-29 Thread Martin Aspeli
Hi guys, I've been saying this quite a few times in the past couple of days, to various people, but SQLAlchemy is intensely good. Well done. :) Anyway, I have a slightly insane use case which may require me to do something like this: - Define a mapper for some table - Instantiate an

[sqlalchemy] Re: Modifying objects after session.save() but before session.flush()

2007-04-29 Thread Martin Aspeli
On Apr 29, 3:48 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Apr 29, 2007, at 7:10 AM, Martin Aspeli wrote: Essentially, I'm dealing with a framework that has a storage layer abstraction which is a little broken. It asks the storage to save values one-by-one, and there is no well