[sqlalchemy] Postgres' arrays in subqueries

2015-10-01 Thread artee
Mike and others :) I have the following sql: select models.code, *array*( select *(clients.id, clients.code) *from clients group by clients.id, clients.code ) as envs from models I ended with something like this: items = DBSession.query(Client.id, Client.code). \

Re: [sqlalchemy] Postgres' arrays in subqueries

2015-10-01 Thread Mike Bayer
On 10/1/15 4:35 AM, artee wrote: Mike and others :) I have the following sql: select models.code, *array*( select *(clients.id, clients.code) *from clients group by clients.id, clients.code ) as envs from models I ended with something like this: items = DBSession.query(Cli