You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to inject a database connection during processing of http request in the custom request scope. Where i can close the connection after request is processed and request scope exits. Can i do this? And can i use custom scope for this?
The text was updated successfully, but these errors were encountered:
You can close the connection explicitly after you're done using it. Or instead of opening/allocating a connection right away you can inject a context manager that lets you manage the connection. Or you can provide an after-request hook that requests the connection object and closes it there. Possibly other ways too, totally up to your code.
I want to inject a database connection during processing of http request in the custom request scope. Where i can close the connection after request is processed and request scope exits. Can i do this? And can i use custom scope for this?
The text was updated successfully, but these errors were encountered: