{"action":"closed","issue":{"url":"https://api.github.com/repos/mysqljs/mysql/issues/1502","repository_url":"https://api.github.com/repos/mysqljs/mysql","labels_url":"https://api.github.com/repos/mysqljs/mysql/issues/1502/labels{/name}","comments_url":"https://api.github.com/repos/mysqljs/mysql/issues/1502/comments","events_url":"https://api.github.com/repos/mysqljs/mysql/issues/1502/events","html_url":"https://github.com/mysqljs/mysql/issues/1502","id":173100324,"number":1502,"title":"Return generated data from inserts?","user":{"login":"geuis","id":53883,"avatar_url":"https://avatars.githubusercontent.com/u/53883?v=3","gravatar_id":"","url":"https://api.github.com/users/geuis","html_url":"https://github.com/geuis","followers_url":"https://api.github.com/users/geuis/followers","following_url":"https://api.github.com/users/geuis/following{/other_user}","gists_url":"https://api.github.com/users/geuis/gists{/gist_id}","starred_url":"https://api.github.com/users/geuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geuis/subscriptions","organizations_url":"https://api.github.com/users/geuis/orgs","repos_url":"https://api.github.com/users/geuis/repos","events_url":"https://api.github.com/users/geuis/events{/privacy}","received_events_url":"https://api.github.com/users/geuis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mysqljs/mysql/labels/question","name":"question","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"assignees":[{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-08-25T02:25:19Z","updated_at":"2016-08-25T02:31:36Z","closed_at":"2016-08-25T02:31:36Z","body":"I might have missed this in the docs. \r\n\r\nMy table has a structure like this: \r\n```\r\nCREATE TABLE `steps` (\r\n  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\r\n  `uid` varchar(36) DEFAULT NULL,\r\n  `guideUid` varchar(36) DEFAULT NULL,\r\n  PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;\r\n```\r\n\r\nWhen I'm doing an insert like this:\r\n```\r\nconst sql = `insert into steps (uid, guideUid) values (uuid(), ?)`\r\nreturn this.query(sql, ['00000000-0000-0000-0000-000000000001'])\r\n```\r\n\r\nThe generated `id` value is returned. Is there also any option to have the generated `uid` returned rather than having to do an additional lookup?"}}
{"actor":{"display_login":"geuis"}}