it's not unheard of that people sometimes do a quick ping, like :
engine = create_engine(...)
engine.scalar("select 1")
just to get it connected and initialized with server information.
On Wed, Feb 21, 2018 at 6:26 AM, wrote:
> Simon, thank you for the reference! That makes sense…
>
> Jens
>
Simon, thank you for the reference! That makes sense…
Jens
On Wednesday, February 21, 2018 at 7:15:20 PM UTC+10, Simon King wrote:
>
> SQLAlchemy doesn't connect to the database until it needs to. Creating
> a Session by itself does not cause it to connect. This is mentioned in
> the docs:
>
On Wed, Feb 21, 2018 at 6:14 AM, wrote:
> Hello,
> Suppose I create a db session the normal way:
>
engine = engine_from_config({"sqlalchemy.url":"mysql+pymysql://…"})
Session = sessionmaker(bind=engine)
session = Session()
>
> I noticed that there is now an order dependency between
Hello,
Suppose I create a db session the normal way:
>>> engine = engine_from_config({"sqlalchemy.url":"mysql+pymysql://…"})
>>> Session = sessionmaker(bind=engine)
>>> session = Session()
I noticed that there is now an order dependency between:
>>> session.bind.dialect.server_version_info # No