[sqlalchemy] orm query - join on inner query

2009-03-27 Thread jarrod.ches...@gmail.com
How can i implement the following query with sqlalchemy.orm objects? SELECT columns.* FROM columns AS col JOIN ( SELECT object_id, revision FROM columns GROUP BY id, revision HAVING revision <= 20 ) AS lr ON c

[sqlalchemy] Re: Adding MapperExtensions after Mappers created

2009-03-19 Thread jarrod.ches...@gmail.com
tupid questions. Thanks On Mar 19, 3:54 am, "Michael Bayer" wrote: > theres a collection called"extension" i believe, which has an append() > method (also unsure of that name). > > jarrod.ches...@gmail.com wrote: > > > How do i add a MapperExtension to a map

[sqlalchemy] Adding MapperExtensions after Mappers created

2009-03-18 Thread jarrod.ches...@gmail.com
How do i add a MapperExtension to a mapper after the mapper has been created with the mapper() function --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalche

[sqlalchemy] Re: Mapped Orm Object Notifier

2009-03-16 Thread jarrod.ches...@gmail.com
class OrmRecord(object): def _get_column_value(self, name): # return self.__dict__[name] return getattr(self, name) def _set_column_value(self, name, value): val = setattr(self, name, value) self._not

[sqlalchemy] Mapped Orm Object Notifier

2009-03-15 Thread jarrod.ches...@gmail.com
Hi I've been reading through the documentation and i can't see an existing feature for this. The table i'm working with stores properties about part of my program. I get a record from the session.queryone() function and i pass that around. The record is somewhere in a properties change dialog

[sqlalchemy] Re: SQLAlchemy Migrate

2009-03-05 Thread jarrod.ches...@gmail.com
Yes, Option 2 - However, From the example documentation, Its doesn't implement everything. Although its most of the way there - So option 2 is looking good to me. On Mar 6, 1:23 am, Lawrence Oluyede wrote: > On Thu, Mar 5, 2009 at 10:03 AM, jarrod.ches...@gmail.com > > wrote: >

[sqlalchemy] SQLAlchemy Migrate

2009-03-05 Thread jarrod.ches...@gmail.com
Hi All I'm writing a metadata based schema migration tool. As SQLAlchemy doesn't support much schema modification. I will implement a complete set of schema migration functions one way or another for several of the SQLAlchemy supported databases. My question is, Where should these function resi

[sqlalchemy] Re: Create tables with metadata

2008-12-11 Thread jarrod.ches...@gmail.com
Doesn't get created in the database. How do i add columns to tables already defined in the database after i have reflected them into the metadata On Dec 12, 12:59 am, Empty wrote: > Hi, > > On Thu, Dec 11, 2008 at 8:12 AM, jarrod.ches...@gmail.com < > > > > ja

[sqlalchemy] Create tables with metadata

2008-12-11 Thread jarrod.ches...@gmail.com
Hi I've scoured the documentation and i can't find any info on how to create a column using metadata. from sqlalchemy import engine from sqlalchemy import schema from sqlalchemy import types _config_dbengine = engine.create_engine('sqlite:tmp/db') _config_metadata = schema.MetaData(_config_d