Closed vfsoraki closed 3 years ago
Might be better suited to create a decorator around it instead to do logging and performance analysis instead iMHO.
@vfsoraki Thanks for bringing up this idea, I can definitely see some value in this 👍
That being said, I agree with what @WyriHaximus said. You can always implement these custom events in a decorator that wraps the underlying connection. This way, it does not affect normal operation and also doesn't have any performance impact not needing these custom events.
I believe this has been answered, so I'm closing this for now. Please come back with more details if you feel this makes sense to have in here and we can always reopen this :+1:
I was thinking of adding more events to Connection.
Events like
query
that is emitted just before query is executed.done
for when a query is finished.Could be used for logging and performance analysis.
Should I make PR?