Customizable query handler #189

wants to merge 2 commits into
Commits on Oct 16, 2012
  1. Rewrite the way we handle socket internally

    weppos committed Oct 16, 2012
    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.
  2. Extract default Socket query handler into its own class

    weppos committed Oct 16, 2012
    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!