{"action":"created","issue":{"url":"https://api.github.com/repos/pekim/tedious/issues/318","labels_url":"https://api.github.com/repos/pekim/tedious/issues/318/labels{/name}","comments_url":"https://api.github.com/repos/pekim/tedious/issues/318/comments","events_url":"https://api.github.com/repos/pekim/tedious/issues/318/events","html_url":"https://github.com/pekim/tedious/issues/318","id":108729811,"number":318,"title":"Query queueing","user":{"login":"janmeier","id":1210224,"avatar_url":"https://avatars.githubusercontent.com/u/1210224?v=3","gravatar_id":"","url":"https://api.github.com/users/janmeier","html_url":"https://github.com/janmeier","followers_url":"https://api.github.com/users/janmeier/followers","following_url":"https://api.github.com/users/janmeier/following{/other_user}","gists_url":"https://api.github.com/users/janmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/janmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janmeier/subscriptions","organizations_url":"https://api.github.com/users/janmeier/orgs","repos_url":"https://api.github.com/users/janmeier/repos","events_url":"https://api.github.com/users/janmeier/events{/privacy}","received_events_url":"https://api.github.com/users/janmeier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-28T19:28:25Z","updated_at":"2015-09-28T20:47:26Z","closed_at":null,"body":"Hi @pekim \r\n\r\nYou might already have noticed us talking about https://github.com/pekim/tedious/issues/19 over in https://github.com/sequelize/sequelize/issues/4105\r\n\r\nBasically node-pg and node-mysql allows you to send several queries on the same connection object - they are then queued in some way, since the actual connection only allows a single query at once, just like mssql (I haven't looked into how they actually implement this)\r\n\r\nIdeally, we want to hide this implementation detail away from the sequelize users - specially when using transactions, where all queries are invoked in the same connection. Right now users have to manually wait for the first query to finish before executing the next one.\r\n\r\nI'm just opening this issue here to ask whether you'd be open to implement some kind of query-queueing in tedious? In my view that would be the most ideal solution, otherwise we'd have to monkey-patch a solution in sequelize. I know @vesters might be interested in posting a bounty"},"comment":{"url":"https://api.github.com/repos/pekim/tedious/issues/comments/143869302","html_url":"https://github.com/pekim/tedious/issues/318#issuecomment-143869302","issue_url":"https://api.github.com/repos/pekim/tedious/issues/318","id":143869302,"user":{"login":"janmeier","id":1210224,"avatar_url":"https://avatars.githubusercontent.com/u/1210224?v=3","gravatar_id":"","url":"https://api.github.com/users/janmeier","html_url":"https://github.com/janmeier","followers_url":"https://api.github.com/users/janmeier/followers","following_url":"https://api.github.com/users/janmeier/following{/other_user}","gists_url":"https://api.github.com/users/janmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/janmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janmeier/subscriptions","organizations_url":"https://api.github.com/users/janmeier/orgs","repos_url":"https://api.github.com/users/janmeier/repos","events_url":"https://api.github.com/users/janmeier/events{/privacy}","received_events_url":"https://api.github.com/users/janmeier/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T20:47:26Z","updated_at":"2015-09-28T20:47:26Z","body":"It seems to work pretty well for mysql and postgres though? It wouldn't have to be limited to transactions only, it could be used for all queries, so you'd always be able to call `execSql` regardless of whether a query is currently running on the connection or not. \r\nI haven't looked closely at the tedious api yet though, do connections and transactions have separate objects? In any case I guess a transaction uses a connection under the hood so it would only need to be implemented at the connection level. \r\n\r\nI agree, using the same connection across multiple requests is very wrong, but that sounds like a complete misunderstanding of what a connection is :-D? "}}