{"action":"created","comment":{"url":"https://api.github.com/repos/crate/crate/pulls/comments/86045313","pull_request_review_id":6724108,"id":86045313,"diff_hunk":"@@ -1266,8 +1266,101 @@ It can be used to remove elements from array fields.\n     +------------------------------+\n     SELECT 1 row in set (... sec)\n \n-Conditional Functions\n-=====================\n+Conditional Functions and Expressions\n+=====================================\n+\n+case when ... then ... end\n+--------------------------\n+\n+The ``case`` expression is a generic conditional expression similar to\n+if/else statements in other programming languages and can be used\n+wherever an expression is valid.\n+\n+::\n+\n+  CASE WHEN condition THEN result\n+       [WHEN ...]\n+       [ELSE result]\n+  END\n+\n+Each *condition* expression must result in a boolean value. If the\n+condition's result is true, the value of the *result* expression\n+that follows the condition will be the final result of the ``case``\n+expression. The remainder will not be proccessed. If the condition's","path":"blackbox/docs/sql/scalar.txt","position":26,"original_position":26,"commit_id":"2ecc690c45132739b6e47aab97ff845cf0801a38","original_commit_id":"2ecc690c45132739b6e47aab97ff845cf0801a38","user":{"login":"matriv","id":5058131,"avatar_url":"https://avatars.githubusercontent.com/u/5058131?v=3","gravatar_id":"","url":"https://api.github.com/users/matriv","html_url":"https://github.com/matriv","followers_url":"https://api.github.com/users/matriv/followers","following_url":"https://api.github.com/users/matriv/following{/other_user}","gists_url":"https://api.github.com/users/matriv/gists{/gist_id}","starred_url":"https://api.github.com/users/matriv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matriv/subscriptions","organizations_url":"https://api.github.com/users/matriv/orgs","repos_url":"https://api.github.com/users/matriv/repos","events_url":"https://api.github.com/users/matriv/events{/privacy}","received_events_url":"https://api.github.com/users/matriv/received_events","type":"User","site_admin":false},"body":"... expression and the subsequent ``when`` branches (or conditions will not be processed.","created_at":"2016-11-01T23:13:43Z","updated_at":"2016-11-01T23:13:43Z","html_url":"https://github.com/crate/crate/pull/4354#discussion_r86045313","pull_request_url":"https://api.github.com/repos/crate/crate/pulls/4354","_links":{"self":{"href":"https://api.github.com/repos/crate/crate/pulls/comments/86045313"},"html":{"href":"https://github.com/crate/crate/pull/4354#discussion_r86045313"},"pull_request":{"href":"https://api.github.com/repos/crate/crate/pulls/4354"}}},"pull_request":{"url":"https://api.github.com/repos/crate/crate/pulls/4354","id":91788110,"html_url":"https://github.com/crate/crate/pull/4354","diff_url":"https://github.com/crate/crate/pull/4354.diff","patch_url":"https://github.com/crate/crate/pull/4354.patch","issue_url":"https://api.github.com/repos/crate/crate/issues/4354","number":4354,"state":"open","locked":false,"title":"implements CASE expression support (F261/F262)","user":{"login":"seut","id":219690,"avatar_url":"https://avatars.githubusercontent.com/u/219690?v=3","gravatar_id":"","url":"https://api.github.com/users/seut","html_url":"https://github.com/seut","followers_url":"https://api.github.com/users/seut/followers","following_url":"https://api.github.com/users/seut/following{/other_user}","gists_url":"https://api.github.com/users/seut/gists{/gist_id}","starred_url":"https://api.github.com/users/seut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seut/subscriptions","organizations_url":"https://api.github.com/users/seut/orgs","repos_url":"https://api.github.com/users/seut/repos","events_url":"https://api.github.com/users/seut/events{/privacy}","received_events_url":"https://api.github.com/users/seut/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-01T14:02:06Z","updated_at":"2016-11-01T23:13:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bbdc6df4d467ccce28e0b01f339996b2fbe54e5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/crate/crate/pulls/4354/commits","review_comments_url":"https://api.github.com/repos/crate/crate/pulls/4354/comments","review_comment_url":"https://api.github.com/repos/crate/crate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crate/crate/issues/4354/comments","statuses_url":"https://api.github.com/repos/crate/crate/statuses/2ecc690c45132739b6e47aab97ff845cf0801a38","head":{"label":"crate:s/case-expression","ref":"s/case-expression","sha":"2ecc690c45132739b6e47aab97ff845cf0801a38","user":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"repo":{"id":9342529,"name":"crate","full_name":"crate/crate","owner":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crate/crate","description":"Crate.IO: The fast, scalable, easy to use SQL database with native full text search","fork":false,"url":"https://api.github.com/repos/crate/crate","forks_url":"https://api.github.com/repos/crate/crate/forks","keys_url":"https://api.github.com/repos/crate/crate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crate/crate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crate/crate/teams","hooks_url":"https://api.github.com/repos/crate/crate/hooks","issue_events_url":"https://api.github.com/repos/crate/crate/issues/events{/number}","events_url":"https://api.github.com/repos/crate/crate/events","assignees_url":"https://api.github.com/repos/crate/crate/assignees{/user}","branches_url":"https://api.github.com/repos/crate/crate/branches{/branch}","tags_url":"https://api.github.com/repos/crate/crate/tags","blobs_url":"https://api.github.com/repos/crate/crate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crate/crate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crate/crate/git/refs{/sha}","trees_url":"https://api.github.com/repos/crate/crate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crate/crate/statuses/{sha}","languages_url":"https://api.github.com/repos/crate/crate/languages","stargazers_url":"https://api.github.com/repos/crate/crate/stargazers","contributors_url":"https://api.github.com/repos/crate/crate/contributors","subscribers_url":"https://api.github.com/repos/crate/crate/subscribers","subscription_url":"https://api.github.com/repos/crate/crate/subscription","commits_url":"https://api.github.com/repos/crate/crate/commits{/sha}","git_commits_url":"https://api.github.com/repos/crate/crate/git/commits{/sha}","comments_url":"https://api.github.com/repos/crate/crate/comments{/number}","issue_comment_url":"https://api.github.com/repos/crate/crate/issues/comments{/number}","contents_url":"https://api.github.com/repos/crate/crate/contents/{+path}","compare_url":"https://api.github.com/repos/crate/crate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crate/crate/merges","archive_url":"https://api.github.com/repos/crate/crate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crate/crate/downloads","issues_url":"https://api.github.com/repos/crate/crate/issues{/number}","pulls_url":"https://api.github.com/repos/crate/crate/pulls{/number}","milestones_url":"https://api.github.com/repos/crate/crate/milestones{/number}","notifications_url":"https://api.github.com/repos/crate/crate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crate/crate/labels{/name}","releases_url":"https://api.github.com/repos/crate/crate/releases{/id}","deployments_url":"https://api.github.com/repos/crate/crate/deployments","created_at":"2013-04-10T09:17:16Z","updated_at":"2016-10-30T02:25:55Z","pushed_at":"2016-11-01T21:30:27Z","git_url":"git://github.com/crate/crate.git","ssh_url":"git@github.com:crate/crate.git","clone_url":"https://github.com/crate/crate.git","svn_url":"https://github.com/crate/crate","homepage":"https://crate.io","size":79651,"stargazers_count":1402,"watchers_count":1402,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":158,"mirror_url":null,"open_issues_count":48,"forks":158,"open_issues":48,"watchers":1402,"default_branch":"master"}},"base":{"label":"crate:master","ref":"master","sha":"66795535bec8e44a8667af1d7d66f3a7161d72c9","user":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"repo":{"id":9342529,"name":"crate","full_name":"crate/crate","owner":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crate/crate","description":"Crate.IO: The fast, scalable, easy to use SQL database with native full text search","fork":false,"url":"https://api.github.com/repos/crate/crate","forks_url":"https://api.github.com/repos/crate/crate/forks","keys_url":"https://api.github.com/repos/crate/crate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crate/crate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crate/crate/teams","hooks_url":"https://api.github.com/repos/crate/crate/hooks","issue_events_url":"https://api.github.com/repos/crate/crate/issues/events{/number}","events_url":"https://api.github.com/repos/crate/crate/events","assignees_url":"https://api.github.com/repos/crate/crate/assignees{/user}","branches_url":"https://api.github.com/repos/crate/crate/branches{/branch}","tags_url":"https://api.github.com/repos/crate/crate/tags","blobs_url":"https://api.github.com/repos/crate/crate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crate/crate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crate/crate/git/refs{/sha}","trees_url":"https://api.github.com/repos/crate/crate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crate/crate/statuses/{sha}","languages_url":"https://api.github.com/repos/crate/crate/languages","stargazers_url":"https://api.github.com/repos/crate/crate/stargazers","contributors_url":"https://api.github.com/repos/crate/crate/contributors","subscribers_url":"https://api.github.com/repos/crate/crate/subscribers","subscription_url":"https://api.github.com/repos/crate/crate/subscription","commits_url":"https://api.github.com/repos/crate/crate/commits{/sha}","git_commits_url":"https://api.github.com/repos/crate/crate/git/commits{/sha}","comments_url":"https://api.github.com/repos/crate/crate/comments{/number}","issue_comment_url":"https://api.github.com/repos/crate/crate/issues/comments{/number}","contents_url":"https://api.github.com/repos/crate/crate/contents/{+path}","compare_url":"https://api.github.com/repos/crate/crate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crate/crate/merges","archive_url":"https://api.github.com/repos/crate/crate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crate/crate/downloads","issues_url":"https://api.github.com/repos/crate/crate/issues{/number}","pulls_url":"https://api.github.com/repos/crate/crate/pulls{/number}","milestones_url":"https://api.github.com/repos/crate/crate/milestones{/number}","notifications_url":"https://api.github.com/repos/crate/crate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crate/crate/labels{/name}","releases_url":"https://api.github.com/repos/crate/crate/releases{/id}","deployments_url":"https://api.github.com/repos/crate/crate/deployments","created_at":"2013-04-10T09:17:16Z","updated_at":"2016-10-30T02:25:55Z","pushed_at":"2016-11-01T21:30:27Z","git_url":"git://github.com/crate/crate.git","ssh_url":"git@github.com:crate/crate.git","clone_url":"https://github.com/crate/crate.git","svn_url":"https://github.com/crate/crate","homepage":"https://crate.io","size":79651,"stargazers_count":1402,"watchers_count":1402,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":158,"mirror_url":null,"open_issues_count":48,"forks":158,"open_issues":48,"watchers":1402,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crate/crate/pulls/4354"},"html":{"href":"https://github.com/crate/crate/pull/4354"},"issue":{"href":"https://api.github.com/repos/crate/crate/issues/4354"},"comments":{"href":"https://api.github.com/repos/crate/crate/issues/4354/comments"},"review_comments":{"href":"https://api.github.com/repos/crate/crate/pulls/4354/comments"},"review_comment":{"href":"https://api.github.com/repos/crate/crate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crate/crate/pulls/4354/commits"},"statuses":{"href":"https://api.github.com/repos/crate/crate/statuses/2ecc690c45132739b6e47aab97ff845cf0801a38"}}}}
{"actor":{"display_login":"matriv"}}