{"action":"closed","number":20,"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/pulls/20","id":27153130,"html_url":"https://github.com/strongloop/loopback-connector-mssql/pull/20","diff_url":"https://github.com/strongloop/loopback-connector-mssql/pull/20.diff","patch_url":"https://github.com/strongloop/loopback-connector-mssql/pull/20.patch","issue_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/issues/20","number":20,"state":"closed","locked":false,"title":"Fix: empty inq/nin function correctly","user":{"login":"bitmage","id":312943,"avatar_url":"https://avatars.githubusercontent.com/u/312943?v=3","gravatar_id":"","url":"https://api.github.com/users/bitmage","html_url":"https://github.com/bitmage","followers_url":"https://api.github.com/users/bitmage/followers","following_url":"https://api.github.com/users/bitmage/following{/other_user}","gists_url":"https://api.github.com/users/bitmage/gists{/gist_id}","starred_url":"https://api.github.com/users/bitmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitmage/subscriptions","organizations_url":"https://api.github.com/users/bitmage/orgs","repos_url":"https://api.github.com/users/bitmage/repos","events_url":"https://api.github.com/users/bitmage/events{/privacy}","received_events_url":"https://api.github.com/users/bitmage/received_events","type":"User","site_admin":false},"body":"This fix makes the query:\r\n\r\n```javascript\r\n{ id: { inq: [] } } }\r\n```\r\n\r\nProduce:\r\n\r\n```sql\r\nWHERE 0 = 1\r\n```\r\n\r\nAnd the query:\r\n\r\n```javascript\r\n{ id: { nin: [] } } }\r\n```\r\n\r\nProduces:\r\n\r\n```sql\r\nWHERE 1 = 1\r\n```\r\n\r\nThe previous behavior resulted in invalid SQL.  More details here:\r\n\r\nhttps://github.com/strongloop/loopback-connector-mssql/issues/19","created_at":"2015-01-10T19:09:12Z","updated_at":"2015-01-12T16:58:18Z","closed_at":"2015-01-12T16:58:18Z","merged_at":"2015-01-12T16:58:18Z","merge_commit_sha":"ecdd3064171408d16589ec7bf129ab761a06ce76","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/pulls/20/commits","review_comments_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/pulls/20/comments","review_comment_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/pulls/comments/{number}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/issues/20/comments","statuses_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/statuses/d7de4dd5eea8835c9107320765c66a1cf6e61293","head":{"label":"TorchlightSoftware:empty-inq","ref":"empty-inq","sha":"d7de4dd5eea8835c9107320765c66a1cf6e61293","user":{"login":"TorchlightSoftware","id":2273296,"avatar_url":"https://avatars.githubusercontent.com/u/2273296?v=3","gravatar_id":"","url":"https://api.github.com/users/TorchlightSoftware","html_url":"https://github.com/TorchlightSoftware","followers_url":"https://api.github.com/users/TorchlightSoftware/followers","following_url":"https://api.github.com/users/TorchlightSoftware/following{/other_user}","gists_url":"https://api.github.com/users/TorchlightSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/TorchlightSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TorchlightSoftware/subscriptions","organizations_url":"https://api.github.com/users/TorchlightSoftware/orgs","repos_url":"https://api.github.com/users/TorchlightSoftware/repos","events_url":"https://api.github.com/users/TorchlightSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/TorchlightSoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":27734087,"name":"loopback-connector-mssql","full_name":"TorchlightSoftware/loopback-connector-mssql","owner":{"login":"TorchlightSoftware","id":2273296,"avatar_url":"https://avatars.githubusercontent.com/u/2273296?v=3","gravatar_id":"","url":"https://api.github.com/users/TorchlightSoftware","html_url":"https://github.com/TorchlightSoftware","followers_url":"https://api.github.com/users/TorchlightSoftware/followers","following_url":"https://api.github.com/users/TorchlightSoftware/following{/other_user}","gists_url":"https://api.github.com/users/TorchlightSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/TorchlightSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TorchlightSoftware/subscriptions","organizations_url":"https://api.github.com/users/TorchlightSoftware/orgs","repos_url":"https://api.github.com/users/TorchlightSoftware/repos","events_url":"https://api.github.com/users/TorchlightSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/TorchlightSoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TorchlightSoftware/loopback-connector-mssql","description":"LoopBack Connector for Microsoft SQL Server (MSSQL)","fork":true,"url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql","forks_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/forks","keys_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/teams","hooks_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/hooks","issue_events_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/issues/events{/number}","events_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/events","assignees_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/assignees{/user}","branches_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/branches{/branch}","tags_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/tags","blobs_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/git/refs{/sha}","trees_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/statuses/{sha}","languages_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/languages","stargazers_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/stargazers","contributors_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/contributors","subscribers_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/subscribers","subscription_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/subscription","commits_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/commits{/sha}","git_commits_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/git/commits{/sha}","comments_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/comments{/number}","issue_comment_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/issues/comments/{number}","contents_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/contents/{+path}","compare_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/merges","archive_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/downloads","issues_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/issues{/number}","pulls_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/pulls{/number}","milestones_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/milestones{/number}","notifications_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/labels{/name}","releases_url":"https://api.github.com/repos/TorchlightSoftware/loopback-connector-mssql/releases{/id}","created_at":"2014-12-08T20:43:30Z","updated_at":"2014-12-08T20:43:31Z","pushed_at":"2015-01-10T19:03:35Z","git_url":"git://github.com/TorchlightSoftware/loopback-connector-mssql.git","ssh_url":"git@github.com:TorchlightSoftware/loopback-connector-mssql.git","clone_url":"https://github.com/TorchlightSoftware/loopback-connector-mssql.git","svn_url":"https://github.com/TorchlightSoftware/loopback-connector-mssql","homepage":"","size":206,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"11ffa40808711e72e01083df530057644d8ac12f","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":16129899,"name":"loopback-connector-mssql","full_name":"strongloop/loopback-connector-mssql","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-connector-mssql","description":"LoopBack Connector for Microsoft SQL Server (MSSQL)","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-connector-mssql","forks_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/issues/comments/{number}","contents_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-connector-mssql/releases{/id}","created_at":"2014-01-22T05:34:06Z","updated_at":"2015-01-09T08:16:31Z","pushed_at":"2015-01-12T16:58:18Z","git_url":"git://github.com/strongloop/loopback-connector-mssql.git","ssh_url":"git@github.com:strongloop/loopback-connector-mssql.git","clone_url":"https://github.com/strongloop/loopback-connector-mssql.git","svn_url":"https://github.com/strongloop/loopback-connector-mssql","homepage":"","size":584,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":9,"forks":7,"open_issues":9,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mssql/pulls/20"},"html":{"href":"https://github.com/strongloop/loopback-connector-mssql/pull/20"},"issue":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mssql/issues/20"},"comments":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mssql/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mssql/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mssql/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mssql/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/loopback-connector-mssql/statuses/d7de4dd5eea8835c9107320765c66a1cf6e61293"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"raymondfeng","id":540892,"avatar_url":"https://avatars.githubusercontent.com/u/540892?v=3","gravatar_id":"","url":"https://api.github.com/users/raymondfeng","html_url":"https://github.com/raymondfeng","followers_url":"https://api.github.com/users/raymondfeng/followers","following_url":"https://api.github.com/users/raymondfeng/following{/other_user}","gists_url":"https://api.github.com/users/raymondfeng/gists{/gist_id}","starred_url":"https://api.github.com/users/raymondfeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymondfeng/subscriptions","organizations_url":"https://api.github.com/users/raymondfeng/orgs","repos_url":"https://api.github.com/users/raymondfeng/repos","events_url":"https://api.github.com/users/raymondfeng/events{/privacy}","received_events_url":"https://api.github.com/users/raymondfeng/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":21,"deletions":1,"changed_files":2}}