{"action":"closed","issue":{"url":"https://api.github.com/repos/fishcakez/db_connection/issues/3","labels_url":"https://api.github.com/repos/fishcakez/db_connection/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/fishcakez/db_connection/issues/3/comments","events_url":"https://api.github.com/repos/fishcakez/db_connection/issues/3/events","html_url":"https://github.com/fishcakez/db_connection/issues/3","id":121383668,"number":3,"title":"Use prepare/execute for queries and remove handle_query","user":{"login":"fishcakez","id":2001229,"avatar_url":"https://avatars.githubusercontent.com/u/2001229?v=3","gravatar_id":"","url":"https://api.github.com/users/fishcakez","html_url":"https://github.com/fishcakez","followers_url":"https://api.github.com/users/fishcakez/followers","following_url":"https://api.github.com/users/fishcakez/following{/other_user}","gists_url":"https://api.github.com/users/fishcakez/gists{/gist_id}","starred_url":"https://api.github.com/users/fishcakez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fishcakez/subscriptions","organizations_url":"https://api.github.com/users/fishcakez/orgs","repos_url":"https://api.github.com/users/fishcakez/repos","events_url":"https://api.github.com/users/fishcakez/events{/privacy}","received_events_url":"https://api.github.com/users/fishcakez/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-10T01:51:55Z","updated_at":"2015-12-12T23:24:05Z","closed_at":"2015-12-12T23:24:05Z","body":"A query should be carried out as a prepare and a execute so that parameter encoding does not have to be done inside `handle_query` where an error will crash the connection. It also means adapters do not have to handle the prepare/encode/execute logic themselves.\r\n\r\nHowever this leads to an issue where un-named queries won't be closed after a query without adding a round trip to explicitly close with `handle_close`. One way to solve this is to introduce a `handle_execute_close` and `execute_close` that allows an adapter to handle the execute and close in an efficient manor. The default implementation provided by `__using__` would call `handle_execute` and `handle_close`."}}