{"action":"created","comment":{"url":"https://api.github.com/repos/yahoo/squidb/pulls/comments/37030110","id":37030110,"diff_hunk":"@@ -246,6 +246,9 @@ protected String separator() {\n      * Begins a CASE statement, populating it with the first WHEN ... THEN branch\n      */\n     public static CaseBuilder caseWhen(Criterion when, Object then) {\n+        if (when == null) {\n+            throw new IllegalArgumentException(\"Can't construct a CASE WHEN statement with a null criterion\");","path":"squidb/src/com/yahoo/squidb/sql/Function.java","position":18,"original_position":18,"commit_id":"5c6af4d1931d9e3c1a220d0a1b122d23dc189c9b","original_commit_id":"5c6af4d1931d9e3c1a220d0a1b122d23dc189c9b","user":{"login":"jdkoren","id":771156,"avatar_url":"https://avatars.githubusercontent.com/u/771156?v=3","gravatar_id":"","url":"https://api.github.com/users/jdkoren","html_url":"https://github.com/jdkoren","followers_url":"https://api.github.com/users/jdkoren/followers","following_url":"https://api.github.com/users/jdkoren/following{/other_user}","gists_url":"https://api.github.com/users/jdkoren/gists{/gist_id}","starred_url":"https://api.github.com/users/jdkoren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdkoren/subscriptions","organizations_url":"https://api.github.com/users/jdkoren/orgs","repos_url":"https://api.github.com/users/jdkoren/repos","events_url":"https://api.github.com/users/jdkoren/events{/privacy}","received_events_url":"https://api.github.com/users/jdkoren/received_events","type":"User","site_admin":false},"body":"Maybe it's better to move this to CaseBuilder.when() itself","created_at":"2015-08-13T21:51:36Z","updated_at":"2015-08-13T21:51:36Z","html_url":"https://github.com/yahoo/squidb/pull/75#discussion_r37030110","pull_request_url":"https://api.github.com/repos/yahoo/squidb/pulls/75","_links":{"self":{"href":"https://api.github.com/repos/yahoo/squidb/pulls/comments/37030110"},"html":{"href":"https://github.com/yahoo/squidb/pull/75#discussion_r37030110"},"pull_request":{"href":"https://api.github.com/repos/yahoo/squidb/pulls/75"}}},"pull_request":{"url":"https://api.github.com/repos/yahoo/squidb/pulls/75","id":42299146,"html_url":"https://github.com/yahoo/squidb/pull/75","diff_url":"https://github.com/yahoo/squidb/pull/75.diff","patch_url":"https://github.com/yahoo/squidb/pull/75.patch","issue_url":"https://api.github.com/repos/yahoo/squidb/issues/75","number":75,"state":"open","locked":false,"title":"Remove Criterion.all and Criterion.none [2.0]","user":{"login":"sbosley","id":622224,"avatar_url":"https://avatars.githubusercontent.com/u/622224?v=3","gravatar_id":"","url":"https://api.github.com/users/sbosley","html_url":"https://github.com/sbosley","followers_url":"https://api.github.com/users/sbosley/followers","following_url":"https://api.github.com/users/sbosley/following{/other_user}","gists_url":"https://api.github.com/users/sbosley/gists{/gist_id}","starred_url":"https://api.github.com/users/sbosley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbosley/subscriptions","organizations_url":"https://api.github.com/users/sbosley/orgs","repos_url":"https://api.github.com/users/sbosley/repos","events_url":"https://api.github.com/users/sbosley/events{/privacy}","received_events_url":"https://api.github.com/users/sbosley/received_events","type":"User","site_admin":false},"body":"Using literals for these criterions actually had some unexpected performance implications, and they weren't super useful anyways. This PR removes them and updates a few things to replace them:\r\n\r\n* Passing a null criterion to methods like deleteWhere or update is now equivalent to \"delete all\" and \"update all\". Accordingly, new convenience methods deleteAll and updateAll have been added to SquidDatabase (refs #16, which was closed but will now be better off than it was when 2.0 launches :) )\r\n* Passing null for a Criterion value is handled more gracefully in several places. It is ignored where possible (e.g. query.where(null) is a no-op) and throws an exception where it is very bad (e.g. Criterion.negate(null) is nonsensical, so throws an IllegalArgumentException).\r\n\r\nUsers who still want the old behavior of Criterion.all (i.e. \"WHERE 1\") can use Criterion.literal(1) instead.","created_at":"2015-08-12T23:00:42Z","updated_at":"2015-08-13T21:51:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25d50427b718517f8a8c1e9dc25550453c848242","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yahoo/squidb/pulls/75/commits","review_comments_url":"https://api.github.com/repos/yahoo/squidb/pulls/75/comments","review_comment_url":"https://api.github.com/repos/yahoo/squidb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yahoo/squidb/issues/75/comments","statuses_url":"https://api.github.com/repos/yahoo/squidb/statuses/5c6af4d1931d9e3c1a220d0a1b122d23dc189c9b","head":{"label":"yahoo:all_and_none","ref":"all_and_none","sha":"5c6af4d1931d9e3c1a220d0a1b122d23dc189c9b","user":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"repo":{"id":34006895,"name":"squidb","full_name":"yahoo/squidb","owner":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yahoo/squidb","description":"SquiDB is a SQLite database layer for Android","fork":false,"url":"https://api.github.com/repos/yahoo/squidb","forks_url":"https://api.github.com/repos/yahoo/squidb/forks","keys_url":"https://api.github.com/repos/yahoo/squidb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yahoo/squidb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yahoo/squidb/teams","hooks_url":"https://api.github.com/repos/yahoo/squidb/hooks","issue_events_url":"https://api.github.com/repos/yahoo/squidb/issues/events{/number}","events_url":"https://api.github.com/repos/yahoo/squidb/events","assignees_url":"https://api.github.com/repos/yahoo/squidb/assignees{/user}","branches_url":"https://api.github.com/repos/yahoo/squidb/branches{/branch}","tags_url":"https://api.github.com/repos/yahoo/squidb/tags","blobs_url":"https://api.github.com/repos/yahoo/squidb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yahoo/squidb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yahoo/squidb/git/refs{/sha}","trees_url":"https://api.github.com/repos/yahoo/squidb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yahoo/squidb/statuses/{sha}","languages_url":"https://api.github.com/repos/yahoo/squidb/languages","stargazers_url":"https://api.github.com/repos/yahoo/squidb/stargazers","contributors_url":"https://api.github.com/repos/yahoo/squidb/contributors","subscribers_url":"https://api.github.com/repos/yahoo/squidb/subscribers","subscription_url":"https://api.github.com/repos/yahoo/squidb/subscription","commits_url":"https://api.github.com/repos/yahoo/squidb/commits{/sha}","git_commits_url":"https://api.github.com/repos/yahoo/squidb/git/commits{/sha}","comments_url":"https://api.github.com/repos/yahoo/squidb/comments{/number}","issue_comment_url":"https://api.github.com/repos/yahoo/squidb/issues/comments{/number}","contents_url":"https://api.github.com/repos/yahoo/squidb/contents/{+path}","compare_url":"https://api.github.com/repos/yahoo/squidb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yahoo/squidb/merges","archive_url":"https://api.github.com/repos/yahoo/squidb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yahoo/squidb/downloads","issues_url":"https://api.github.com/repos/yahoo/squidb/issues{/number}","pulls_url":"https://api.github.com/repos/yahoo/squidb/pulls{/number}","milestones_url":"https://api.github.com/repos/yahoo/squidb/milestones{/number}","notifications_url":"https://api.github.com/repos/yahoo/squidb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yahoo/squidb/labels{/name}","releases_url":"https://api.github.com/repos/yahoo/squidb/releases{/id}","created_at":"2015-04-15T16:54:33Z","updated_at":"2015-08-12T05:36:18Z","pushed_at":"2015-08-13T21:41:20Z","git_url":"git://github.com/yahoo/squidb.git","ssh_url":"git@github.com:yahoo/squidb.git","clone_url":"https://github.com/yahoo/squidb.git","svn_url":"https://github.com/yahoo/squidb","homepage":"https://github.com/yahoo/squidb/wiki","size":21563,"stargazers_count":946,"watchers_count":946,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":82,"mirror_url":null,"open_issues_count":10,"forks":82,"open_issues":10,"watchers":946,"default_branch":"master"}},"base":{"label":"yahoo:dev_2.0","ref":"dev_2.0","sha":"a9d37a45fe82f2a8f75985ced96117bf5bf11058","user":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"repo":{"id":34006895,"name":"squidb","full_name":"yahoo/squidb","owner":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yahoo/squidb","description":"SquiDB is a SQLite database layer for Android","fork":false,"url":"https://api.github.com/repos/yahoo/squidb","forks_url":"https://api.github.com/repos/yahoo/squidb/forks","keys_url":"https://api.github.com/repos/yahoo/squidb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yahoo/squidb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yahoo/squidb/teams","hooks_url":"https://api.github.com/repos/yahoo/squidb/hooks","issue_events_url":"https://api.github.com/repos/yahoo/squidb/issues/events{/number}","events_url":"https://api.github.com/repos/yahoo/squidb/events","assignees_url":"https://api.github.com/repos/yahoo/squidb/assignees{/user}","branches_url":"https://api.github.com/repos/yahoo/squidb/branches{/branch}","tags_url":"https://api.github.com/repos/yahoo/squidb/tags","blobs_url":"https://api.github.com/repos/yahoo/squidb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yahoo/squidb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yahoo/squidb/git/refs{/sha}","trees_url":"https://api.github.com/repos/yahoo/squidb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yahoo/squidb/statuses/{sha}","languages_url":"https://api.github.com/repos/yahoo/squidb/languages","stargazers_url":"https://api.github.com/repos/yahoo/squidb/stargazers","contributors_url":"https://api.github.com/repos/yahoo/squidb/contributors","subscribers_url":"https://api.github.com/repos/yahoo/squidb/subscribers","subscription_url":"https://api.github.com/repos/yahoo/squidb/subscription","commits_url":"https://api.github.com/repos/yahoo/squidb/commits{/sha}","git_commits_url":"https://api.github.com/repos/yahoo/squidb/git/commits{/sha}","comments_url":"https://api.github.com/repos/yahoo/squidb/comments{/number}","issue_comment_url":"https://api.github.com/repos/yahoo/squidb/issues/comments{/number}","contents_url":"https://api.github.com/repos/yahoo/squidb/contents/{+path}","compare_url":"https://api.github.com/repos/yahoo/squidb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yahoo/squidb/merges","archive_url":"https://api.github.com/repos/yahoo/squidb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yahoo/squidb/downloads","issues_url":"https://api.github.com/repos/yahoo/squidb/issues{/number}","pulls_url":"https://api.github.com/repos/yahoo/squidb/pulls{/number}","milestones_url":"https://api.github.com/repos/yahoo/squidb/milestones{/number}","notifications_url":"https://api.github.com/repos/yahoo/squidb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yahoo/squidb/labels{/name}","releases_url":"https://api.github.com/repos/yahoo/squidb/releases{/id}","created_at":"2015-04-15T16:54:33Z","updated_at":"2015-08-12T05:36:18Z","pushed_at":"2015-08-13T21:41:20Z","git_url":"git://github.com/yahoo/squidb.git","ssh_url":"git@github.com:yahoo/squidb.git","clone_url":"https://github.com/yahoo/squidb.git","svn_url":"https://github.com/yahoo/squidb","homepage":"https://github.com/yahoo/squidb/wiki","size":21563,"stargazers_count":946,"watchers_count":946,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":82,"mirror_url":null,"open_issues_count":10,"forks":82,"open_issues":10,"watchers":946,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yahoo/squidb/pulls/75"},"html":{"href":"https://github.com/yahoo/squidb/pull/75"},"issue":{"href":"https://api.github.com/repos/yahoo/squidb/issues/75"},"comments":{"href":"https://api.github.com/repos/yahoo/squidb/issues/75/comments"},"review_comments":{"href":"https://api.github.com/repos/yahoo/squidb/pulls/75/comments"},"review_comment":{"href":"https://api.github.com/repos/yahoo/squidb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yahoo/squidb/pulls/75/commits"},"statuses":{"href":"https://api.github.com/repos/yahoo/squidb/statuses/5c6af4d1931d9e3c1a220d0a1b122d23dc189c9b"}}}}