{"action":"created","issue":{"url":"https://api.github.com/repos/agershun/alasql/issues/345","labels_url":"https://api.github.com/repos/agershun/alasql/issues/345/labels{/name}","comments_url":"https://api.github.com/repos/agershun/alasql/issues/345/comments","events_url":"https://api.github.com/repos/agershun/alasql/issues/345/events","html_url":"https://github.com/agershun/alasql/issues/345","id":92441454,"number":345,"title":"Last Insert ID","user":{"login":"TheDeadCode","id":1714641,"avatar_url":"https://avatars.githubusercontent.com/u/1714641?v=3","gravatar_id":"","url":"https://api.github.com/users/TheDeadCode","html_url":"https://github.com/TheDeadCode","followers_url":"https://api.github.com/users/TheDeadCode/followers","following_url":"https://api.github.com/users/TheDeadCode/following{/other_user}","gists_url":"https://api.github.com/users/TheDeadCode/gists{/gist_id}","starred_url":"https://api.github.com/users/TheDeadCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheDeadCode/subscriptions","organizations_url":"https://api.github.com/users/TheDeadCode/orgs","repos_url":"https://api.github.com/users/TheDeadCode/repos","events_url":"https://api.github.com/users/TheDeadCode/events{/privacy}","received_events_url":"https://api.github.com/users/TheDeadCode/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"agershun","id":643040,"avatar_url":"https://avatars.githubusercontent.com/u/643040?v=3","gravatar_id":"","url":"https://api.github.com/users/agershun","html_url":"https://github.com/agershun","followers_url":"https://api.github.com/users/agershun/followers","following_url":"https://api.github.com/users/agershun/following{/other_user}","gists_url":"https://api.github.com/users/agershun/gists{/gist_id}","starred_url":"https://api.github.com/users/agershun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agershun/subscriptions","organizations_url":"https://api.github.com/users/agershun/orgs","repos_url":"https://api.github.com/users/agershun/repos","events_url":"https://api.github.com/users/agershun/events{/privacy}","received_events_url":"https://api.github.com/users/agershun/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-07-01T17:33:04Z","updated_at":"2015-07-01T20:46:32Z","closed_at":null,"body":"Hi!\r\n\r\nI'm currently using Node.JS. Here is my code.\r\n    db.memory = require('alasql').Database();\r\n    db.memory.exec('CREATE TABLE session (id INT AUTOINCREMENT, sessid STRING)');\r\n    db.memory.exec('INSERT INTO session (sessid) VALUES (\"TEST\")');\r\n\r\nHow to get the last insert ID of the last query executed?\r\n\r\nThanks!\r\n\r\n   "},"comment":{"url":"https://api.github.com/repos/agershun/alasql/issues/comments/117819900","html_url":"https://github.com/agershun/alasql/issues/345#issuecomment-117819900","issue_url":"https://api.github.com/repos/agershun/alasql/issues/345","id":117819900,"user":{"login":"agershun","id":643040,"avatar_url":"https://avatars.githubusercontent.com/u/643040?v=3","gravatar_id":"","url":"https://api.github.com/users/agershun","html_url":"https://github.com/agershun","followers_url":"https://api.github.com/users/agershun/followers","following_url":"https://api.github.com/users/agershun/following{/other_user}","gists_url":"https://api.github.com/users/agershun/gists{/gist_id}","starred_url":"https://api.github.com/users/agershun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agershun/subscriptions","organizations_url":"https://api.github.com/users/agershun/orgs","repos_url":"https://api.github.com/users/agershun/repos","events_url":"https://api.github.com/users/agershun/events{/privacy}","received_events_url":"https://api.github.com/users/agershun/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T20:46:32Z","updated_at":"2015-07-01T20:46:32Z","body":"I your case it will be:\r\n```\r\n    db.memory.tables.session.identities.id.value\r\n```\r\nHere:\r\n* ```db.memory``` - is a name of database\r\n* ```tables.session``` - session table\r\n* ```identities``` - collection of counters\r\n* ```id``` - counter\r\n* ```value``` - current value of counter"}}