Re: [sqlalchemy] Attach a string to each results of a query

2010-12-10 Thread Christian Démolis
Okay it works literal() and literal_column() functions works with sqlite but only literal() function works with MySQLdb connector Thanks a lot !) 2010/12/9 Michael Bayer mike...@zzzcomputing.com On Dec 9, 2010, at 11:14 AM, Christian Démolis wrote: Could not locate column in row for column

[sqlalchemy] Attach a string to each results of a query

2010-12-09 Thread Christian Démolis
Hi, SELECT IdActe, coucou FROM `acte` WHERE 1 How to attach a string to each result of a query ? i try that but it doesn't work :( s = model.session.query(milieu, model.Dossier.NomEntreprise, model.Dossier.AgendaSensGroupement, model.Dossier.AgendaUnite, *Coucou*) Thx Chris -- You

Re: [sqlalchemy] Attach a string to each results of a query

2010-12-09 Thread Michael Bayer
you want to use literal_column('coucou') to achieve that effect, or if a bind is OK then just use literal(coucou). On Dec 9, 2010, at 8:30 AM, Christian Démolis wrote: Hi, SELECT IdActe, coucou FROM `acte` WHERE 1 How to attach a string to each result of a query ? i try that

Re: [sqlalchemy] Attach a string to each results of a query

2010-12-09 Thread Michael Bayer
On Dec 9, 2010, at 11:14 AM, Christian Démolis wrote: Could not locate column in row for column '%s' % key) sqlalchemy.exc.NoSuchColumnError: 'Could not locate column in row for column \' lng\'' I don t want to call a column by litteral name. you're thinking of the label() function.