[sqlalchemy] Querying number column as if it is a unicode column

2011-12-09 Thread Martijn Moeling
Hi, I'm puzzled on how to get this working: class User(base): Id = Column (Integer, primarykey=true) Name= Column(Unicode(100)) Session.query(User).filter(User.Name.like(query+%)).all() is all fine. now I want to add an extension

Re: [sqlalchemy] Querying number column as if it is a unicode column

2011-12-09 Thread Michael Bayer
On Dec 9, 2011, at 5:28 AM, Martijn Moeling wrote: Hi, I'm puzzled on how to get this working: class User(base): Id = Column (Integer, primarykey=true) Name= Column(Unicode(100))

[sqlalchemy] union and literal_column

2011-12-09 Thread Alex Parij
Hi , I'm using SA 0.5. query1 = session.query(literal_column('Phrase').label('type')).filter(...) query2 = session.query(literal_column('Exact').label('type')).filter(...) and then : query1.union(query2) gives me : SELECT* 'Phrase' as type* FROM (SELECT 'Phrase' as type FROM table1 WHERE

[sqlalchemy] SQLAlchemy 0.7.4 Released

2011-12-09 Thread Michael Bayer
Happy Friday all - SQLAlchemy 0.7.4 is released. This is the latest and greatest, the version of SQLAlchemy that I would choose above all others. Along with the recent release of the new migrations tool, Alembic, you guys should be all humming along very nicely with your databases at this

[sqlalchemy] Re: union and literal_column

2011-12-09 Thread Alexander Parij
even simpler example: session.query(literal_column('A').label('type')).union(session.query(literal_column('B').label('type'))).all() returns: [(u'A',), (u'A',)] instead of [(u'A',), (u'B',)] -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To

Re: [sqlalchemy] union and literal_column

2011-12-09 Thread Michael Bayer
the UNION stuff in query() took awhile to get right and had a lot of bugs in the 0.5 days. If you try 0.7, you'll get: SELECT anon_1.type AS anon_1_type FROM (SELECT 'Phrase' AS type UNION SELECT 'Exact' AS type) AS anon_1 so old bug, either work with SQL expressions (i.e. tables, select(),

Re: [sqlalchemy] union and literal_column

2011-12-09 Thread Alexander Parij
Oh wow , thanks for the quick reply ! -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/T2TL9Wv9xGEJ. To post to this group, send email to