Context:This discussion topic has most (if not all) the context. It boils down to the following: When instantiating an instance of Gino via the API (when using something like gino-starlette) it'd be beneficial to be able to set the connection reuse behaviour explicitly for the connection pool. These changes achieves that whilst maintaining the functionality before the changes are applied.
Value:
Make Gino more usable for this specific usecase, but add more flexibility in the functionality of the underlying package when using it via the API.
Changes:
[X] add reuse as acceptable parameter on init in api.py (e.g. when called using gino.ext.starlette)
[X] add functionality to set reuse flag in GinoEngine class methods, passed to the GinoEngine.acquire() method
[X] add reuse as accepted parameter in engine_args in strategies.py
Tests passing:
Tests passing in the as-is state. No new tests added as there are already tests in place to check the use of reuse flag.
Context: This discussion topic has most (if not all) the context. It boils down to the following: When instantiating an instance of Gino via the API (when using something like
gino-starlette
) it'd be beneficial to be able to set the connection reuse behaviour explicitly for the connection pool. These changes achieves that whilst maintaining the functionality before the changes are applied.Value: Make Gino more usable for this specific usecase, but add more flexibility in the functionality of the underlying package when using it via the API.
Changes:
api.py
(e.g. when called usinggino.ext.starlette
)reuse
flag inGinoEngine
class methods, passed to theGinoEngine.acquire()
methodreuse
as accepted parameter inengine_args
instrategies.py
Tests passing: Tests passing in the as-is state. No new tests added as there are already tests in place to check the use of
reuse
flag.