{"action":"created","issue":{"url":"https://api.github.com/repos/sidorares/node-mysql2/issues/831","repository_url":"https://api.github.com/repos/sidorares/node-mysql2","labels_url":"https://api.github.com/repos/sidorares/node-mysql2/issues/831/labels{/name}","comments_url":"https://api.github.com/repos/sidorares/node-mysql2/issues/831/comments","events_url":"https://api.github.com/repos/sidorares/node-mysql2/issues/831/events","html_url":"https://github.com/sidorares/node-mysql2/issues/831","id":349148187,"node_id":"MDU6SXNzdWUzNDkxNDgxODc=","number":831,"title":"execute/query from json like tokenized params","user":{"login":"ituhin","id":694751,"node_id":"MDQ6VXNlcjY5NDc1MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/694751?v=4","gravatar_id":"","url":"https://api.github.com/users/ituhin","html_url":"https://github.com/ituhin","followers_url":"https://api.github.com/users/ituhin/followers","following_url":"https://api.github.com/users/ituhin/following{/other_user}","gists_url":"https://api.github.com/users/ituhin/gists{/gist_id}","starred_url":"https://api.github.com/users/ituhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ituhin/subscriptions","organizations_url":"https://api.github.com/users/ituhin/orgs","repos_url":"https://api.github.com/users/ituhin/repos","events_url":"https://api.github.com/users/ituhin/events{/privacy}","received_events_url":"https://api.github.com/users/ituhin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-09T14:17:37Z","updated_at":"2018-08-09T15:15:13Z","closed_at":null,"author_association":"NONE","body":"do we have feature like this ? i am unable to get it work using mysql2\r\n\r\npool.query( 'SELECT * FROM tablename WHERE col1 = :pid AND col2 = :tid',  {pid:5, tid:6}  )\r\n.then((rs)=>{console.log(rs)})\r\n.catch((e)=>{console.log(e)})\r\n\r\nthis gives error.... i have tried pool.execute() as well but no luck. \r\n\r\nof-course i can build the query manually by doing a string replace and escape params etc. \r\nbut i thought this is a basic feature. and i am aware of features like using the \"?\", but i need it this way.\r\n\r\ncould not find this kinda examples in the doc, which uses named placeholders.\r\n"},"comment":{"url":"https://api.github.com/repos/sidorares/node-mysql2/issues/comments/411793638","html_url":"https://github.com/sidorares/node-mysql2/issues/831#issuecomment-411793638","issue_url":"https://api.github.com/repos/sidorares/node-mysql2/issues/831","id":411793638,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTc5MzYzOA==","user":{"login":"ituhin","id":694751,"node_id":"MDQ6VXNlcjY5NDc1MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/694751?v=4","gravatar_id":"","url":"https://api.github.com/users/ituhin","html_url":"https://github.com/ituhin","followers_url":"https://api.github.com/users/ituhin/followers","following_url":"https://api.github.com/users/ituhin/following{/other_user}","gists_url":"https://api.github.com/users/ituhin/gists{/gist_id}","starred_url":"https://api.github.com/users/ituhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ituhin/subscriptions","organizations_url":"https://api.github.com/users/ituhin/orgs","repos_url":"https://api.github.com/users/ituhin/repos","events_url":"https://api.github.com/users/ituhin/events{/privacy}","received_events_url":"https://api.github.com/users/ituhin/received_events","type":"User","site_admin":false},"created_at":"2018-08-09T15:15:13Z","updated_at":"2018-08-09T15:15:13Z","author_association":"NONE","body":"var sql = 'SELECT * FROM relations WHERE parent_id = :pid AND daughter_id = :did'\r\nconn / pool\r\n.query({sql:sql, namedPlaceholders: true}, {pid:5, did:6})\r\n\r\nthis doesnt work either"}}
{"actor":{"display_login":"ituhin"}}