[sqlalchemy] Re: Materialized Path for SQLAlchemy Declarative Base

2009-08-07 Thread allen.fowler
On Aug 6, 6:54 pm, AF allen.fow...@yahoo.com wrote: Hello all, Has anyone here used the sqlamp: Materialized Path for SQLAlchemy library? I am wondering: 1) Does it seem to work well? 2) Did you use it with Declarative Base, and if so, how did you configure it? Anybody?

[sqlalchemy] VIEW alternative in SQLAlchemy

2009-08-07 Thread AF
Hello, I have a table of records in the database that I want to run read queries against, but I do want to include all of them in the search. (There are a couple of filtering parameters to exclude records from the searched pool, including an aptly named is_active flag.) Traditionally, I would

[sqlalchemy] Re: VIEW alternative in SQLAlchemy

2009-08-07 Thread Michael Bayer
AF wrote: Hello, I have a table of records in the database that I want to run read queries against, but I do want to include all of them in the search. (There are a couple of filtering parameters to exclude records from the searched pool, including an aptly named is_active flag.)

[sqlalchemy] Re: VIEW alternative in SQLAlchemy

2009-08-07 Thread allen.fowler
On Aug 7, 11:45 am, Michael Bayer mike...@zzzcomputing.com wrote: AF wrote: Hello, I have a table of records in the database that I want to run read queries against, but I do want to include all of them in the search. (There are a couple of filtering parameters to exclude records

[sqlalchemy] Re: VIEW alternative in SQLAlchemy

2009-08-07 Thread werner
Allen, allen.fowler wrote: ... To clarify: I am using SQLAlchemy's Declarative Base to fully define and create my database. For instance, there is a simple class/table Records, and I would like to define a class CurrentRecords that is implemented in the database as a view on Records.

[sqlalchemy] Re: Materialized Path for SQLAlchemy Declarative Base

2009-08-07 Thread werner
Allen, allen.fowler wrote: On Aug 6, 6:54 pm, AF allen.fow...@yahoo.com wrote: Hello all, Has anyone here used the sqlamp: Materialized Path for SQLAlchemy library? I am wondering: 1) Does it seem to work well? 2) Did you use it with Declarative Base, and if so, how did you

[sqlalchemy] Re: VIEW alternative in SQLAlchemy

2009-08-07 Thread allen.fowler
... To clarify: I am using SQLAlchemy's Declarative Base to fully define and create my database. For instance, there is a simple class/table Records, and I would like to define a class CurrentRecords that is implemented in the database as a view on Records. In this way, I can

[sqlalchemy] Re: VIEW alternative in SQLAlchemy

2009-08-07 Thread werner
allen.fowler wrote: ... To clarify: I am using SQLAlchemy's Declarative Base to fully define and create my database. For instance, there is a simple class/table Records, and I would like to define a class CurrentRecords that is implemented in the database as a view on

[sqlalchemy] Re: django like inspectdb

2009-08-07 Thread Michael Trier
Hi, On Fri, Aug 7, 2009 at 1:41 AM, dusans dusan.smit...@gmail.com wrote: is there something similar to inspectdb in sqlalchemy where it returns orm classes for tables already in the db? - You mean like this: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/AutoCode Also if you don't want

[sqlalchemy] Re: Getting the mysql_insert_id() for multiple inserts

2009-08-07 Thread abhi
Or may be I can generate the ids myself and insert them since using a db specific api is something I want to avoid. Thanks a lot anyways for that information. Regards, Abhi On Aug 8, 5:42 am, Michael Bayer mike...@zzzcomputing.com wrote: DBAPI's executemany() doesn't return cursor.lastrowid

[sqlalchemy] Updating a self referential relation

2009-08-07 Thread Mike Conley
I have been experimenting with self referential relations and invented this class class People(Base): __tablename__ = 'people' id = Column(Integer, primary_key=True) name = Column(String) id_spouse = Column(Integer, ForeignKey('people.id')) id_mom = Column(Integer,