{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/2322","repository_url":"https://api.github.com/repos/sequelize/sequelize","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/2322/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/2322/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/2322/events","html_url":"https://github.com/sequelize/sequelize/issues/2322","id":43464857,"number":2322,"title":"question: how to try/test sequelize in console","user":{"login":"apneadiving","id":247583,"avatar_url":"https://avatars.githubusercontent.com/u/247583?v=3","gravatar_id":"","url":"https://api.github.com/users/apneadiving","html_url":"https://github.com/apneadiving","followers_url":"https://api.github.com/users/apneadiving/followers","following_url":"https://api.github.com/users/apneadiving/following{/other_user}","gists_url":"https://api.github.com/users/apneadiving/gists{/gist_id}","starred_url":"https://api.github.com/users/apneadiving/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apneadiving/subscriptions","organizations_url":"https://api.github.com/users/apneadiving/orgs","repos_url":"https://api.github.com/users/apneadiving/repos","events_url":"https://api.github.com/users/apneadiving/events{/privacy}","received_events_url":"https://api.github.com/users/apneadiving/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sequelize/sequelize/labels/question","name":"question","color":"02d7e1"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":43,"created_at":"2014-09-22T11:08:58Z","updated_at":"2016-10-05T12:28:40Z","closed_at":"2014-09-22T19:14:50Z","body":"Hi,\r\n\r\nComing from the Rails' world, I find it very convenient to go in my console and check my queries to ensure they return what I want.\r\n\r\nI'm not sure how to do this using Express and Sequelize. Using the `node-inspector`, I set a debugger then once here, write:\r\n\r\n    User.findAll().success(function(users){ debugger; })\r\n\r\nI hit enter, I resume the process but it fails to stop on the new introduced breakpoint.\r\n\r\nCould you explain me how you do proceed to test queries? Do I really have to reload the page each time?\r\n\r\nThanks,\r\n\r\nBenjamin"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/251660307","html_url":"https://github.com/sequelize/sequelize/issues/2322#issuecomment-251660307","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/2322","id":251660307,"user":{"login":"janmeier","id":1210224,"avatar_url":"https://avatars.githubusercontent.com/u/1210224?v=3","gravatar_id":"","url":"https://api.github.com/users/janmeier","html_url":"https://github.com/janmeier","followers_url":"https://api.github.com/users/janmeier/followers","following_url":"https://api.github.com/users/janmeier/following{/other_user}","gists_url":"https://api.github.com/users/janmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/janmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janmeier/subscriptions","organizations_url":"https://api.github.com/users/janmeier/orgs","repos_url":"https://api.github.com/users/janmeier/repos","events_url":"https://api.github.com/users/janmeier/events{/privacy}","received_events_url":"https://api.github.com/users/janmeier/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T12:28:40Z","updated_at":"2016-10-05T12:28:40Z","body":"There is no automated way, but assuming you have exported all your models in a file you could do something like this to see all users:\r\n\r\n```bash\r\nnode\r\n> var models = require('./models.js');\r\n> models.User.findAll().then(console.log);\r\n```\r\n\r\nOne problem is that everything is async in node, so there is no easy way to write a command in the console and wait for it to complete - You have to attach a promise handler.\r\n\r\nAs for updating etc - No, I don't think that would be plausible to do in the console"}}
{"actor":{"display_login":"janmeier"}}