{"action":"created","issue":{"url":"https://api.github.com/repos/patriksimek/node-mssql/issues/110","labels_url":"https://api.github.com/repos/patriksimek/node-mssql/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/patriksimek/node-mssql/issues/110/comments","events_url":"https://api.github.com/repos/patriksimek/node-mssql/issues/110/events","html_url":"https://github.com/patriksimek/node-mssql/issues/110","id":54482614,"number":110,"title":"Difference between sql.connect and sql.connection","user":{"login":"iamdriz","id":801252,"avatar_url":"https://avatars.githubusercontent.com/u/801252?v=3","gravatar_id":"","url":"https://api.github.com/users/iamdriz","html_url":"https://github.com/iamdriz","followers_url":"https://api.github.com/users/iamdriz/followers","following_url":"https://api.github.com/users/iamdriz/following{/other_user}","gists_url":"https://api.github.com/users/iamdriz/gists{/gist_id}","starred_url":"https://api.github.com/users/iamdriz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamdriz/subscriptions","organizations_url":"https://api.github.com/users/iamdriz/orgs","repos_url":"https://api.github.com/users/iamdriz/repos","events_url":"https://api.github.com/users/iamdriz/events{/privacy}","received_events_url":"https://api.github.com/users/iamdriz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-15T18:01:58Z","updated_at":"2015-01-15T22:14:03Z","closed_at":null,"body":"What's the difference between:\r\n\r\n~~~\r\nvar connection = sql.connect(config, function(err) {\r\n\r\n});\r\n~~~\r\n\r\nand\r\n\r\n~~~\r\nvar connection = new sql.Connection(config, function(err) {\r\n\r\n});\r\n~~~\r\n\r\nas they are both Global!"},"comment":{"url":"https://api.github.com/repos/patriksimek/node-mssql/issues/comments/70172604","html_url":"https://github.com/patriksimek/node-mssql/issues/110#issuecomment-70172604","issue_url":"https://api.github.com/repos/patriksimek/node-mssql/issues/110","id":70172604,"user":{"login":"iamdriz","id":801252,"avatar_url":"https://avatars.githubusercontent.com/u/801252?v=3","gravatar_id":"","url":"https://api.github.com/users/iamdriz","html_url":"https://github.com/iamdriz","followers_url":"https://api.github.com/users/iamdriz/followers","following_url":"https://api.github.com/users/iamdriz/following{/other_user}","gists_url":"https://api.github.com/users/iamdriz/gists{/gist_id}","starred_url":"https://api.github.com/users/iamdriz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamdriz/subscriptions","organizations_url":"https://api.github.com/users/iamdriz/orgs","repos_url":"https://api.github.com/users/iamdriz/repos","events_url":"https://api.github.com/users/iamdriz/events{/privacy}","received_events_url":"https://api.github.com/users/iamdriz/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T22:14:03Z","updated_at":"2015-01-15T22:14:03Z","body":"But they are both global right? As l store the connection in a global variable for both!\r\n\r\nSent from my iPhone\r\n\r\n> On 15 Jan 2015, at 21:17, Patrik Simek <notifications@github.com> wrote:\r\n> \r\n> Global means you can create a new request anywhere without passing a connection to request's constructor.\r\n> \r\n> —\r\n> Reply to this email directly or view it on GitHub.\r\n> "}}