[sqlalchemy] Re: Can't find anything equivalent to bit_or in PostgreSQL

2020-06-16 Thread Balukrishnan
Thank you very much. I tried that and it is working perfectly for me. On Wednesday, June 17, 2020 at 3:12:04 AM UTC+5:30, Jonathan Vanasco wrote: > > If this just needs this to be rendered for PostgreSQL, you can use the > `func` generator: > > > https://docs.sqlalchemy.org/en/13/core/sqlelement.

[sqlalchemy] Can't find anything equivalent to bit_or in PostgreSQL

2020-06-16 Thread Balukrishnan
Hi friends, I am looking for function or operator which is equivalent to bit_or in PostgreSQL aggregate function . Is there any? I can't find any. Please help. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapp

[sqlalchemy] Re: anon_label issue. Need to label with a valid name in the select query

2020-03-03 Thread Balukrishnan
Thank you, my friend. Sorry for the incorrect example which I provide On Monday, March 2, 2020 at 8:37:00 PM UTC+5:30, Balukrishnan wrote: > > Hi friends, > > I am using some expressions in the select values itself like this. > > data = select([testb.c.var1.op('&

[sqlalchemy] Re: anon_label issue. Need to label with a valid name in the select query

2020-03-03 Thread Balukrishnan
Thank you, my friend, now it's working fine. Sorry for the incorrect example which I provide. On Monday, March 2, 2020 at 8:37:00 PM UTC+5:30, Balukrishnan wrote: > > Hi friends, > > I am using some expressions in the select values itself like this. > > data = select(

[sqlalchemy] anon_label issue. Need to label with a valid name in the select query

2020-03-02 Thread Balukrishnan
Hi friends, I am using some expressions in the select values itself like this. data = select([testb.c.var1.op('&')(5)]).From(testb).execute() But the corresponding SQL generated is SELECT (testb.var1 & $1) != $2 AS anon_1 FROM testb, Args: (1, 0) I can't label the column-like testb.c.var1.o

[sqlalchemy] Re: Bitwise AND operation in a select statement support in sqlalchemy

2020-02-25 Thread Balukrishnan
llable) * - *select([testa.c.id.op("&")(15).anon_label("Id")]) . **=> Error (TypeError: '_anonymous_label' object is not callable)* How can I label that column with a known name On Tuesday, February 25, 2020 at 10:32:22 PM UTC+5:30, Balukrishnan wrote:

Re: [sqlalchemy] Bitwise AND operation in a select statement support in sqlalchemy

2020-02-25 Thread Balukrishnan
e the "op" function to get at the postgres & operator: > > > https://docs.sqlalchemy.org/en/13/core/sqlelement.html#sqlalchemy.sql.expression.ColumnElement.op > > > Something like this: > > select([testa.c.id.op("&")(15)]) >

[sqlalchemy] Bitwise AND operation in a select statement support in sqlalchemy

2020-02-25 Thread Balukrishnan
Table definition *from sqlalchemy import * testa = Table( "testa", metadata, Column("id", BigInteger, primary_key=True), Column("str_var_a", String, nullable=True), Colmn("bool_var_a", Boolean, nullable=True), ) * and I need to execute a query like. *select([testa.c.id & 15