Re: [sqlalchemy] group_concat, op and separator

2012-07-27 Thread Sergey Kucheryavski
Thanks! On Sunday, July 22, 2012 4:23:53 PM UTC+2, Michael Bayer wrote: > > that is a bug and here is a workaround: > > from sqlalchemy.sql import column, func, literal_column > > # work around [ticket:2537] until SQLAlchemy 0.8 > from sqlalchemy.sql import operators > operators._PRECEDENCE['SEPAR

Re: [sqlalchemy] group_concat, op and separator

2012-07-22 Thread Michael Bayer
that is a bug and here is a workaround: from sqlalchemy.sql import column, func, literal_column # work around [ticket:2537] until SQLAlchemy 0.8 from sqlalchemy.sql import operators operators._PRECEDENCE['SEPARATOR'] = 0 expr = func.group_concat(column('urlname').op('SEPARATOR')(literal_column('

[sqlalchemy] group_concat, op and separator

2012-07-22 Thread Sergey Kucheryavski
I try to use group_concat with SEPARATOR option as it was proposed in other topic but got a strange issue with using group_concat and op: this expression: print node.urlname.op('SEPARATOR')('/') gives node.urlname SEPARATOR :urlname_1 But this expression print func.group_concat(node.urlname.op('