I will probably move some code into classes, instead of using namespaced_methods.
#query_handle exists because it's the best method to be hooked if you want to instrument and measure the queries. It sits just before the socket connection, can handle the errors and exposes the final list of args.
This allows swappable query handler.
Do you want to use an EM async handler? Write the class and set Base.query_handler to your handler.
Do you want a test handler to avoid external connections in testing? Yes, I do!