[sqlalchemy] How do I do append_whereclause() using the ORM?

2006-12-18 Thread Robin Munn
Maybe this is in the documentation, but if so, I've missed it. I'd like to do something like the stmt = users.select(); stmt.append_whereclause(...) example found in http://www.sqlalchemy.org/docs/sqlconstruction.myt#sql_building , but using a Query object taken from an ORM mapper via

[sqlalchemy] Re: How do I do append_whereclause() using the ORM?

2006-12-18 Thread Jose Soares
Robin Munn ha scritto: Maybe this is in the documentation, but if so, I've missed it. I'd like to do something like the stmt = users.select(); stmt.append_whereclause(...) example found in http://www.sqlalchemy.org/docs/sqlconstruction.myt#sql_building , but using a Query object taken from

[sqlalchemy] Re: SQLAlchemy, SQLite: ordering case insensitive

2006-12-18 Thread ragnar
Ah, that explains it. Thanks for the answer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send

[sqlalchemy] value too long for type character varying

2006-12-18 Thread ml
Hi! Can I force SA (0.2.8) to ignore the sqlalchemy.exceptions.SQLError: (ProgrammingError) value too long for type character varying... and silently truncate the inserted data? Thank you! David --~--~-~--~~~---~--~~ You received this message because you are

[sqlalchemy] Re: value too long for type character varying

2006-12-18 Thread Michael Bayer
well theres no way to ignore a SQL error and force an operation to succeed. the best strategy here is to subclass the String type to do a string truncation in the convert_bind_param() step (that or, do a length check beforehand). --~--~-~--~~~---~--~~ You

[sqlalchemy] single Session, queries against multiple classes issues

2006-12-18 Thread Alan Franzoni
Hello, I have encountered a strange behaviour within SA, but since I seem to be making silly questions lately, I'm not attaching a full test case - I will if a bug is suspected. session = create_session() #1st block form = session.query(Formato).get_by(id=7).reparti print form #2nd block ed =

[sqlalchemy] Misunderstanding something with autoloading

2006-12-18 Thread Sean Davis
I have a simple test case given here: from sqlalchemy import * db = create_engine('postgres://user:[EMAIL PROTECTED]/test5') metadata = BoundMetaData(db) tb = Table('gffdata',metadata,autoload=True) Up to this point, I think this looks like what is in the tutorial. However, I get the

[sqlalchemy] Re: how to assign values to columns of a mapper?

2006-12-18 Thread robert rottermann
Michael Bayer wrote: the error message indicates that there is more than one Session in play. a big reason for this is that people have import sqlalchemy.ext.threadlocal lying around when they dont really want that. thanks for the hint, I do not use threadlocal in any direct way but I am