{"action":"created","issue":{"url":"https://api.github.com/repos/Kinto/kinto.js/issues/478","repository_url":"https://api.github.com/repos/Kinto/kinto.js","labels_url":"https://api.github.com/repos/Kinto/kinto.js/issues/478/labels{/name}","comments_url":"https://api.github.com/repos/Kinto/kinto.js/issues/478/comments","events_url":"https://api.github.com/repos/Kinto/kinto.js/issues/478/events","html_url":"https://github.com/Kinto/kinto.js/pull/478","id":161984973,"number":478,"title":"build listRecordsById query dynamically","user":{"login":"glasserc","id":17006,"avatar_url":"https://avatars.githubusercontent.com/u/17006?v=3","gravatar_id":"","url":"https://api.github.com/users/glasserc","html_url":"https://github.com/glasserc","followers_url":"https://api.github.com/users/glasserc/followers","following_url":"https://api.github.com/users/glasserc/following{/other_user}","gists_url":"https://api.github.com/users/glasserc/gists{/gist_id}","starred_url":"https://api.github.com/users/glasserc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glasserc/subscriptions","organizations_url":"https://api.github.com/users/glasserc/orgs","repos_url":"https://api.github.com/users/glasserc/repos","events_url":"https://api.github.com/users/glasserc/events{/privacy}","received_events_url":"https://api.github.com/users/glasserc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Kinto/kinto.js/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-06-23T18:00:15Z","updated_at":"2016-06-24T15:26:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Kinto/kinto.js/pulls/478","html_url":"https://github.com/Kinto/kinto.js/pull/478","diff_url":"https://github.com/Kinto/kinto.js/pull/478.diff","patch_url":"https://github.com/Kinto/kinto.js/pull/478.patch"},"body":"The old code ended up generating queries like:\r\n\r\n```sql\r\nSELECT record_id, record\r\n  FROM collection_data\r\n    WHERE collection_name = 'foo'\r\n      AND record_id IN ('1\\',\\'2\\',\\'3');\r\n```\r\n\r\n... which is completely wrong. Instead of generating a list of values, it just assumed the quotes and commas were part of one large value.\r\n\r\nAccording to http://stackoverflow.com/a/4789034, \"There is no way to directly bind a text parameter to multiple integer (or, for that matter, multiple text) parameters.\" Instead we commit this atrocity.\r\n\r\nr? @leplatrem "},"comment":{"url":"https://api.github.com/repos/Kinto/kinto.js/issues/comments/228376365","html_url":"https://github.com/Kinto/kinto.js/pull/478#issuecomment-228376365","issue_url":"https://api.github.com/repos/Kinto/kinto.js/issues/478","id":228376365,"user":{"login":"n1k0","id":41547,"avatar_url":"https://avatars.githubusercontent.com/u/41547?v=3","gravatar_id":"","url":"https://api.github.com/users/n1k0","html_url":"https://github.com/n1k0","followers_url":"https://api.github.com/users/n1k0/followers","following_url":"https://api.github.com/users/n1k0/following{/other_user}","gists_url":"https://api.github.com/users/n1k0/gists{/gist_id}","starred_url":"https://api.github.com/users/n1k0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n1k0/subscriptions","organizations_url":"https://api.github.com/users/n1k0/orgs","repos_url":"https://api.github.com/users/n1k0/repos","events_url":"https://api.github.com/users/n1k0/events{/privacy}","received_events_url":"https://api.github.com/users/n1k0/received_events","type":"User","site_admin":false},"created_at":"2016-06-24T15:26:20Z","updated_at":"2016-06-24T15:26:20Z","body":"r+!"}}
{"actor":{"display_login":"n1k0"}}