{"action":"created","issue":{"url":"https://api.github.com/repos/mvolkmann/mysql-easier/issues/7","repository_url":"https://api.github.com/repos/mvolkmann/mysql-easier","labels_url":"https://api.github.com/repos/mvolkmann/mysql-easier/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/mvolkmann/mysql-easier/issues/7/comments","events_url":"https://api.github.com/repos/mvolkmann/mysql-easier/issues/7/events","html_url":"https://github.com/mvolkmann/mysql-easier/issues/7","id":298673717,"number":7,"title":"`updateById` doesn't work with JS dates","user":{"login":"VoltiSubito","id":1888131,"avatar_url":"https://avatars0.githubusercontent.com/u/1888131?v=4","gravatar_id":"","url":"https://api.github.com/users/VoltiSubito","html_url":"https://github.com/VoltiSubito","followers_url":"https://api.github.com/users/VoltiSubito/followers","following_url":"https://api.github.com/users/VoltiSubito/following{/other_user}","gists_url":"https://api.github.com/users/VoltiSubito/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltiSubito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltiSubito/subscriptions","organizations_url":"https://api.github.com/users/VoltiSubito/orgs","repos_url":"https://api.github.com/users/VoltiSubito/repos","events_url":"https://api.github.com/users/VoltiSubito/events{/privacy}","received_events_url":"https://api.github.com/users/VoltiSubito/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-20T17:06:37Z","updated_at":"2018-02-20T17:13:20Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This works:\r\n```javascript\r\nconn.query('update dt_table set myDt = ? where id = ?', new Date(), 1);\r\n```\r\n\r\nThis doesn't:\r\n```javascript\r\nconn.updateById('dt_table', 1, {myDt: new Date()});\r\n```\r\n\r\nLooking into it a bit, it looks like sql-util surrounds anything that is a string with single quotes but leaves Dates alone which causes parsing errors."},"comment":{"url":"https://api.github.com/repos/mvolkmann/mysql-easier/issues/comments/367048940","html_url":"https://github.com/mvolkmann/mysql-easier/issues/7#issuecomment-367048940","issue_url":"https://api.github.com/repos/mvolkmann/mysql-easier/issues/7","id":367048940,"user":{"login":"VoltiSubito","id":1888131,"avatar_url":"https://avatars0.githubusercontent.com/u/1888131?v=4","gravatar_id":"","url":"https://api.github.com/users/VoltiSubito","html_url":"https://github.com/VoltiSubito","followers_url":"https://api.github.com/users/VoltiSubito/followers","following_url":"https://api.github.com/users/VoltiSubito/following{/other_user}","gists_url":"https://api.github.com/users/VoltiSubito/gists{/gist_id}","starred_url":"https://api.github.com/users/VoltiSubito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoltiSubito/subscriptions","organizations_url":"https://api.github.com/users/VoltiSubito/orgs","repos_url":"https://api.github.com/users/VoltiSubito/repos","events_url":"https://api.github.com/users/VoltiSubito/events{/privacy}","received_events_url":"https://api.github.com/users/VoltiSubito/received_events","type":"User","site_admin":false},"created_at":"2018-02-20T17:13:20Z","updated_at":"2018-02-20T17:13:20Z","author_association":"CONTRIBUTOR","body":"A `timestamp`"}}
{"actor":{"display_login":"VoltiSubito"}}