Hi all,
Apologies for the long-winded question. I'm currently working on an
application that uses SQLAlchemy along with gevent + psycogreen + gunicorn.
I recently added a pool_recycle of 120 to one of our engines:
engine = create_engine(
db_url,
pool_size=default_manager.database_pool_si
yes, for example with select():
s1 = select([t.c.c1, t.c.c2, t.c.c3])
s2 = select([t2.c.c1, t.c.c2, null().label('col4'), null.label('col5')])
u1 = union(s1, s2)
I'd recommend using union() and select() to create these queries. the ORM
Query.union() method is not as easy to use and long term
thanks mike!
On Monday, June 1, 2020 at 7:15:23 PM UTC-4, Mike Bayer wrote:
>
> yes use the PrimaryKeyConstraint() construct
>
>
>
> https://docs.sqlalchemy.org/en/13/core/constraints.html?highlight=primarykeyconstraint#sqlalchemy.schema.PrimaryKeyConstraint
>
> here you'd want to put it in your _
Hi All,
I would like to do a union between 3 or 4 tables using the all powerful
sqlalchemy. The tables have about 3 columns that are the same but each
table has 2 different columns.
Is it possible to do a query as below in sqlalchemy?
Select Col1, Col2, Col3, Col4, Col5 from Table1
Union
Selec