{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/issues/102","repository_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql","labels_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/issues/102/comments","events_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/issues/102/events","html_url":"https://github.com/strongloop/loopback-connector-mssql/pull/102","id":181126436,"number":102,"title":"Add connectorCapabilities global object","user":{"login":"duffn","id":3457341,"avatar_url":"https://avatars.githubusercontent.com/u/3457341?v=3","gravatar_id":"","url":"https://api.github.com/users/duffn","html_url":"https://github.com/duffn","followers_url":"https://api.github.com/users/duffn/followers","following_url":"https://api.github.com/users/duffn/following{/other_user}","gists_url":"https://api.github.com/users/duffn/gists{/gist_id}","starred_url":"https://api.github.com/users/duffn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duffn/subscriptions","organizations_url":"https://api.github.com/users/duffn/orgs","repos_url":"https://api.github.com/users/duffn/repos","events_url":"https://api.github.com/users/duffn/events{/privacy}","received_events_url":"https://api.github.com/users/duffn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-05T11:18:36Z","updated_at":"2016-10-05T11:18:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/pulls/102","html_url":"https://github.com/strongloop/loopback-connector-mssql/pull/102","diff_url":"https://github.com/strongloop/loopback-connector-mssql/pull/102.diff","patch_url":"https://github.com/strongloop/loopback-connector-mssql/pull/102.patch"},"body":"## Purpose\r\n\r\nThis PR is to support the new `connectorCapabilities` object added to loopback-datasource-juggler as discussed here: https://github.com/strongloop/loopback-datasource-juggler/pull/1091.\r\n\r\nThis object will allow connectors to tell the tests in [basic-querying.test.js](https://github.com/strongloop/loopback-datasource-juggler/blob/master/test/basic-querying.test.js) whether or not they support a certain operator, so new operators added do not cause downstream connector tests to fail. Tests run when the operator is supported and do not run when it is not.\r\n\r\n## Example\r\n\r\nIn a connector's `test/init.js`\r\n``` js\r\nglobal.connectorCapabilities = {\r\n  ilike: false,\r\n  nilike: false,\r\n};\r\n```\r\n\r\nIn loopback-datasource-juggler `test/basic-querying.test.js`\r\n```js\r\nvar itWhenIlikeSupported = connectorCapabilities.ilike ? it : it.skip.bind(it);\r\n\r\nitWhenIlikeSupported('should support \"like\" that is satisfied', function(done) {\r\n  User.find({where: {name: {like: 'John'}}}, function(err, users) {\r\n    if (err) return done(err);\r\n    users.length.should.equal(1);\r\n    users[0].name.should.equal('John Lennon');\r\n    done();\r\n  });\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/issues/comments/251647572","html_url":"https://github.com/strongloop/loopback-connector-mssql/pull/102#issuecomment-251647572","issue_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/issues/102","id":251647572,"user":{"login":"slnode","id":3865961,"avatar_url":"https://avatars.githubusercontent.com/u/3865961?v=3","gravatar_id":"","url":"https://api.github.com/users/slnode","html_url":"https://github.com/slnode","followers_url":"https://api.github.com/users/slnode/followers","following_url":"https://api.github.com/users/slnode/following{/other_user}","gists_url":"https://api.github.com/users/slnode/gists{/gist_id}","starred_url":"https://api.github.com/users/slnode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slnode/subscriptions","organizations_url":"https://api.github.com/users/slnode/orgs","repos_url":"https://api.github.com/users/slnode/repos","events_url":"https://api.github.com/users/slnode/events{/privacy}","received_events_url":"https://api.github.com/users/slnode/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T11:18:37Z","updated_at":"2016-10-05T11:18:37Z","body":"Can one of the admins verify this patch? To accept patch and trigger a build add comment \".*ok\\W+to\\W+test.*\""}}
{"actor":{"display_login":"slnode"}}