[sqlalchemy] Re: use func.* as adapter only

2008-11-25 Thread Michael Bayer
Glauco wrote: I don't know if is better to use the psycopg adapter. Can i use the funct.* function only as adapter? example: In [1]: aa = [1,2,3,4,] In [2]: print sa.func.in_( *aa ) in(:in, :in_1, :in_2, :in_3) how to obtain this? in ( 1,2,3,4 ) perhaps you're looking for

[sqlalchemy] Re: use func.* as adapter only

2008-11-25 Thread Glauco
Michael Bayer ha scritto: Glauco wrote: I don't know if is better to use the psycopg adapter. Can i use the funct.* function only as adapter? example: In [1]: aa = [1,2,3,4,] In [2]: print sa.func.in_( *aa ) in(:in, :in_1, :in_2, :in_3) how to obtain this? in ( 1,2,3,4 )

[sqlalchemy] Re: use func.* as adapter only

2008-11-25 Thread Michael Bayer
from sqlalchemy import * aa = [1,2,3,4] print func.in_(*[literal_column(str(x)) for x in aa]) in(1, 2, 3, 4) this is what you asked for ? Glauco wrote: Michael Bayer ha scritto: Glauco wrote: I don't know if is better to use the psycopg adapter. Can i use the funct.* function only

[sqlalchemy] Re: use func.* as adapter only

2008-11-25 Thread Glauco
Michael Bayer ha scritto: from sqlalchemy import * aa = [1,2,3,4] print func.in_(*[literal_column(str(x)) for x in aa]) in(1, 2, 3, 4) this is what you asked for ? Yess! well done ! I'm using the sa.func.literal_column instead of sa.literal_column... Thank you one more