Re: [sqlalchemy] Column alias created by SQLAlchemy is exeeding max column length of db2.

2012-04-21 Thread Michael Bayer
On Apr 21, 2012, at 7:04 PM, Yap Sok Ann wrote: > > Sorry to dig up an old thread. On DB2 for z/OS, the identifier length limit > is 30 for column and column alias, and 128 for almost everything else: > > http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z9.d

Re: [sqlalchemy] Column alias created by SQLAlchemy is exeeding max column length of db2.

2012-04-21 Thread Yap Sok Ann
On Wednesday, June 24, 2009 10:25:09 PM UTC+8, Michael Bayer wrote: > > Beeno wrote: > > > > Hello > > > > Sqlalchemy appears to be aliasing each column in a SELECT statement as > > a concatenation of the schema, table name and column name. The > > resulting alias exceeds DB2's 30 character limit f

Re: [sqlalchemy] How to properly use a property for self._value or self.parent.value

2012-04-21 Thread Michael Bayer
On Apr 21, 2012, at 7:06 AM, Moritz Schlarb wrote: > > So basically, a Child object may set it's own value for time, but if it's not > set, it uses the value from its parent. > This works, but I would also like to be able to do something like: > > session.query(Child).filter(Child.parent.anoth

Re: [sqlalchemy] ColumnCollection.add of Function objects

2012-04-21 Thread Michael Bayer
On Apr 21, 2012, at 12:39 AM, poogie wrote: > Hello, > > I am upgrading a system from sqlalchemy 0.5.3 to sqlalchemy 0.7.3. I a > seeing breakage when adding an instance of sql.functions.sum( Column ) > to a ColumnCollection. that's an unusual use case. ColumnCollection as of yet was only int

[sqlalchemy] How to properly use a property for self._value or self.parent.value

2012-04-21 Thread Moritz Schlarb
Hi at all, I haven't found something by googling, but I'm also not sure about the right search terms, so I hope some can help me here. I have a model like this: class Parent(DeclarativeBase): id = Column(Integer, primary_key=True) time = Column(Float) another_id = Column(Integer) cl

[sqlalchemy] ColumnCollection.add of Function objects

2012-04-21 Thread poogie
Hello, I am upgrading a system from sqlalchemy 0.5.3 to sqlalchemy 0.7.3. I a seeing breakage when adding an instance of sql.functions.sum( Column ) to a ColumnCollection. Here is the add method from the 0.7.3 version: def add(self, column): """Add a column to this collection.