Re: [sqlalchemy] connection pooling

2023-06-08 Thread Mike Bayer
On Thu, Jun 8, 2023, at 12:47 PM, Suraj Shaw wrote: > Hi Mike, > > One more update. > I am using DRCP functionality of oracle so i have to add :pooled at the end > of connect string. > If you run without using :pooled it is running correctly with output as > (datetime.datetime(2023, 6, 8, 22,

Re: [sqlalchemy] connection pooling

2023-06-08 Thread Mike Bayer
On Thu, Jun 8, 2023, at 12:38 PM, Suraj Shaw wrote: > Hi Mike, > > Is it like first conn.close() is closing the pool itself instead of releasing > connection back to pool. SQLAlchemy calls the .close() method on the connection itself. Per oracledb docs at https://python-oracledb.readthedoc

Re: [sqlalchemy] connection pooling

2023-06-08 Thread Suraj Shaw
Hi Mike, One more update. I am using DRCP functionality of oracle so i have to add :pooled at the end of connect string. If you run without using :pooled it is running correctly with output as (datetime.datetime(2023, 6, 8, 22, 13, 56, 762291),) (datetime.datetime(2023, 6, 8, 22, 13, 57, 376310)

Re: [sqlalchemy] connection pooling

2023-06-08 Thread Suraj Shaw
Hi Mike, Is it like first conn.close() is closing the pool itself instead of releasing connection back to pool. Thanks Suraj On Thu, 8 Jun 2023 at 18:34, Mike Bayer wrote: > unknown. I've run your program exactly as written with SQLAlchemy 2.0.15 > and it succeeds on both queries. I would ad

Re: [sqlalchemy] connection pooling

2023-06-08 Thread Mike Bayer
unknown. I've run your program exactly as written with SQLAlchemy 2.0.15 and it succeeds on both queries. I would advise reaching out to https://github.com/oracle/python-oracledb/discussions for debugging help. feel free to show them our recipe from https://docs.sqlalchemy.org/en/20/dialect

Re: [sqlalchemy] Sql constructor

2023-06-08 Thread Mike Bayer
we can't take on maintenance for new extensions within the SQLAlchemy project directly but I would encourage you to release your extension as its own library; see https://pypi.org/search/?q=sqlalchemy for other examples On Tue, Jun 6, 2023, at 5:34 PM, Nir Assaraf wrote: > Hey guys, > > As a pa

[sqlalchemy] connection pooling

2023-06-08 Thread Suraj Shaw
Hi Team, I am using connection pooling in sqlalchemy using oracle own pool.My script looks like this. ``` from sqlalchemy import create_engine,text from sqlalchemy.pool import NullPool import oracledb pool = oracledb.create_pool(user='XXX', password='XXX',dsn='XXX:1521/XXX', min=1, max=5, inc