{"action":"created","comment":{"url":"https://api.github.com/repos/opencypher/openCypher/pulls/comments/103571872","pull_request_review_id":24362212,"id":103571872,"diff_hunk":"@@ -0,0 +1,74 @@\n+= CIP2016-01-26 - Mandatory Match\n+:numbered:\n+:toc:\n+:toc-placement: macro\n+:source-highlighter: codemirror\n+\n+*Author:* Stefan Plantikow <stefan.plantikow@neotechnology.com>\n+\n+[abstract]\n+.Abstract\n+--\n+This CIP proposes adding a new variant of the `MATCH` clause called `MANDATORY MATCH` that fails when it does not match at least a single row in the underlying graph.\n+--\n+\n+toc::[]\n+\n+== Motivation\n+\n+When writing applications using Cypher, many queries will start off by looking up multiple individual nodes based on an unique id with the implied expectation of matching exactly one node. When that expectation is not fulfilled (either due to sending a wrong id or the node having been deleted) it becomes important to identify which lookup failed. Achieving  this currently is not well supported by Cypher.\n+\n+== Background\n+\n+The idea for this CIP grew out of a (now abandoned) dog fooding project for storing benchmarking information in Neo4j.\n+\n+== Proposal\n+\n+This CIP suggests the introduction of a new clause called `MANDATORY MATCH` that has the same basic form as the existing `MATCH` clause (i.e. `MANDATORY MATCH <pattern> [WHERE <predicate>]`).\n+\n+If matching the graph pattern described by `MANDATORY MATCH` fails to match at least a single row, the execution of the whole Cypher query fails with a descriptive error message that points to which `MANDATORY MATCH` clause failed and includes all bound identifiers and parameters used in trying to match the described graph pattern.\n+\n+=== Example\n+\n+Find some nodes for which uniqueness constraints have been created up-front:","path":"cip/CIP2016-01-26-mandatory-match.adoc","position":33,"original_position":33,"commit_id":"4ed1014243ef40a4f0677c5706b75219d5729310","original_commit_id":"4ed1014243ef40a4f0677c5706b75219d5729310","user":{"login":"boggle","id":50886,"avatar_url":"https://avatars0.githubusercontent.com/u/50886?v=3","gravatar_id":"","url":"https://api.github.com/users/boggle","html_url":"https://github.com/boggle","followers_url":"https://api.github.com/users/boggle/followers","following_url":"https://api.github.com/users/boggle/following{/other_user}","gists_url":"https://api.github.com/users/boggle/gists{/gist_id}","starred_url":"https://api.github.com/users/boggle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boggle/subscriptions","organizations_url":"https://api.github.com/users/boggle/orgs","repos_url":"https://api.github.com/users/boggle/repos","events_url":"https://api.github.com/users/boggle/events{/privacy}","received_events_url":"https://api.github.com/users/boggle/received_events","type":"User","site_admin":false},"body":"True, this just refers back to the originally motivating use-case.","created_at":"2017-02-28T22:52:49Z","updated_at":"2017-02-28T22:52:49Z","html_url":"https://github.com/opencypher/openCypher/pull/17#discussion_r103571872","pull_request_url":"https://api.github.com/repos/opencypher/openCypher/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/opencypher/openCypher/pulls/comments/103571872"},"html":{"href":"https://github.com/opencypher/openCypher/pull/17#discussion_r103571872"},"pull_request":{"href":"https://api.github.com/repos/opencypher/openCypher/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/opencypher/openCypher/pulls/17","id":57388339,"html_url":"https://github.com/opencypher/openCypher/pull/17","diff_url":"https://github.com/opencypher/openCypher/pull/17.diff","patch_url":"https://github.com/opencypher/openCypher/pull/17.patch","issue_url":"https://api.github.com/repos/opencypher/openCypher/issues/17","number":17,"state":"open","locked":false,"title":"Add MANDATORY MATCH","user":{"login":"boggle","id":50886,"avatar_url":"https://avatars0.githubusercontent.com/u/50886?v=3","gravatar_id":"","url":"https://api.github.com/users/boggle","html_url":"https://github.com/boggle","followers_url":"https://api.github.com/users/boggle/followers","following_url":"https://api.github.com/users/boggle/following{/other_user}","gists_url":"https://api.github.com/users/boggle/gists{/gist_id}","starred_url":"https://api.github.com/users/boggle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boggle/subscriptions","organizations_url":"https://api.github.com/users/boggle/orgs","repos_url":"https://api.github.com/users/boggle/repos","events_url":"https://api.github.com/users/boggle/events{/privacy}","received_events_url":"https://api.github.com/users/boggle/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-27T16:52:40Z","updated_at":"2017-02-28T22:52:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb966ee8e303809edd5fc62e1f70b802d1a18559","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/opencypher/openCypher/pulls/17/commits","review_comments_url":"https://api.github.com/repos/opencypher/openCypher/pulls/17/comments","review_comment_url":"https://api.github.com/repos/opencypher/openCypher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencypher/openCypher/issues/17/comments","statuses_url":"https://api.github.com/repos/opencypher/openCypher/statuses/4ed1014243ef40a4f0677c5706b75219d5729310","head":{"label":"boggle:CIP2016-01-26-mandatory-match","ref":"CIP2016-01-26-mandatory-match","sha":"4ed1014243ef40a4f0677c5706b75219d5729310","user":{"login":"boggle","id":50886,"avatar_url":"https://avatars0.githubusercontent.com/u/50886?v=3","gravatar_id":"","url":"https://api.github.com/users/boggle","html_url":"https://github.com/boggle","followers_url":"https://api.github.com/users/boggle/followers","following_url":"https://api.github.com/users/boggle/following{/other_user}","gists_url":"https://api.github.com/users/boggle/gists{/gist_id}","starred_url":"https://api.github.com/users/boggle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boggle/subscriptions","organizations_url":"https://api.github.com/users/boggle/orgs","repos_url":"https://api.github.com/users/boggle/repos","events_url":"https://api.github.com/users/boggle/events{/privacy}","received_events_url":"https://api.github.com/users/boggle/received_events","type":"User","site_admin":false},"repo":{"id":44965987,"name":"openCypher","full_name":"boggle/openCypher","owner":{"login":"boggle","id":50886,"avatar_url":"https://avatars0.githubusercontent.com/u/50886?v=3","gravatar_id":"","url":"https://api.github.com/users/boggle","html_url":"https://github.com/boggle","followers_url":"https://api.github.com/users/boggle/followers","following_url":"https://api.github.com/users/boggle/following{/other_user}","gists_url":"https://api.github.com/users/boggle/gists{/gist_id}","starred_url":"https://api.github.com/users/boggle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boggle/subscriptions","organizations_url":"https://api.github.com/users/boggle/orgs","repos_url":"https://api.github.com/users/boggle/repos","events_url":"https://api.github.com/users/boggle/events{/privacy}","received_events_url":"https://api.github.com/users/boggle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/boggle/openCypher","description":"Specification of the Cypher query language","fork":true,"url":"https://api.github.com/repos/boggle/openCypher","forks_url":"https://api.github.com/repos/boggle/openCypher/forks","keys_url":"https://api.github.com/repos/boggle/openCypher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boggle/openCypher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boggle/openCypher/teams","hooks_url":"https://api.github.com/repos/boggle/openCypher/hooks","issue_events_url":"https://api.github.com/repos/boggle/openCypher/issues/events{/number}","events_url":"https://api.github.com/repos/boggle/openCypher/events","assignees_url":"https://api.github.com/repos/boggle/openCypher/assignees{/user}","branches_url":"https://api.github.com/repos/boggle/openCypher/branches{/branch}","tags_url":"https://api.github.com/repos/boggle/openCypher/tags","blobs_url":"https://api.github.com/repos/boggle/openCypher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boggle/openCypher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boggle/openCypher/git/refs{/sha}","trees_url":"https://api.github.com/repos/boggle/openCypher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boggle/openCypher/statuses/{sha}","languages_url":"https://api.github.com/repos/boggle/openCypher/languages","stargazers_url":"https://api.github.com/repos/boggle/openCypher/stargazers","contributors_url":"https://api.github.com/repos/boggle/openCypher/contributors","subscribers_url":"https://api.github.com/repos/boggle/openCypher/subscribers","subscription_url":"https://api.github.com/repos/boggle/openCypher/subscription","commits_url":"https://api.github.com/repos/boggle/openCypher/commits{/sha}","git_commits_url":"https://api.github.com/repos/boggle/openCypher/git/commits{/sha}","comments_url":"https://api.github.com/repos/boggle/openCypher/comments{/number}","issue_comment_url":"https://api.github.com/repos/boggle/openCypher/issues/comments{/number}","contents_url":"https://api.github.com/repos/boggle/openCypher/contents/{+path}","compare_url":"https://api.github.com/repos/boggle/openCypher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boggle/openCypher/merges","archive_url":"https://api.github.com/repos/boggle/openCypher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boggle/openCypher/downloads","issues_url":"https://api.github.com/repos/boggle/openCypher/issues{/number}","pulls_url":"https://api.github.com/repos/boggle/openCypher/pulls{/number}","milestones_url":"https://api.github.com/repos/boggle/openCypher/milestones{/number}","notifications_url":"https://api.github.com/repos/boggle/openCypher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boggle/openCypher/labels{/name}","releases_url":"https://api.github.com/repos/boggle/openCypher/releases{/id}","deployments_url":"https://api.github.com/repos/boggle/openCypher/deployments","created_at":"2015-10-26T12:08:29Z","updated_at":"2016-01-30T08:56:46Z","pushed_at":"2017-01-25T20:16:35Z","git_url":"git://github.com/boggle/openCypher.git","ssh_url":"git@github.com:boggle/openCypher.git","clone_url":"https://github.com/boggle/openCypher.git","svn_url":"https://github.com/boggle/openCypher","homepage":null,"size":2525,"stargazers_count":0,"watchers_count":0,"language":null,"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":"opencypher:master","ref":"master","sha":"3ea7838dca25bf3af4eeb01755f06fe2376200d4","user":{"login":"opencypher","id":14857376,"avatar_url":"https://avatars1.githubusercontent.com/u/14857376?v=3","gravatar_id":"","url":"https://api.github.com/users/opencypher","html_url":"https://github.com/opencypher","followers_url":"https://api.github.com/users/opencypher/followers","following_url":"https://api.github.com/users/opencypher/following{/other_user}","gists_url":"https://api.github.com/users/opencypher/gists{/gist_id}","starred_url":"https://api.github.com/users/opencypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencypher/subscriptions","organizations_url":"https://api.github.com/users/opencypher/orgs","repos_url":"https://api.github.com/users/opencypher/repos","events_url":"https://api.github.com/users/opencypher/events{/privacy}","received_events_url":"https://api.github.com/users/opencypher/received_events","type":"Organization","site_admin":false},"repo":{"id":30405191,"name":"openCypher","full_name":"opencypher/openCypher","owner":{"login":"opencypher","id":14857376,"avatar_url":"https://avatars1.githubusercontent.com/u/14857376?v=3","gravatar_id":"","url":"https://api.github.com/users/opencypher","html_url":"https://github.com/opencypher","followers_url":"https://api.github.com/users/opencypher/followers","following_url":"https://api.github.com/users/opencypher/following{/other_user}","gists_url":"https://api.github.com/users/opencypher/gists{/gist_id}","starred_url":"https://api.github.com/users/opencypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencypher/subscriptions","organizations_url":"https://api.github.com/users/opencypher/orgs","repos_url":"https://api.github.com/users/opencypher/repos","events_url":"https://api.github.com/users/opencypher/events{/privacy}","received_events_url":"https://api.github.com/users/opencypher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencypher/openCypher","description":"Specification of the Cypher property graph query language","fork":false,"url":"https://api.github.com/repos/opencypher/openCypher","forks_url":"https://api.github.com/repos/opencypher/openCypher/forks","keys_url":"https://api.github.com/repos/opencypher/openCypher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencypher/openCypher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencypher/openCypher/teams","hooks_url":"https://api.github.com/repos/opencypher/openCypher/hooks","issue_events_url":"https://api.github.com/repos/opencypher/openCypher/issues/events{/number}","events_url":"https://api.github.com/repos/opencypher/openCypher/events","assignees_url":"https://api.github.com/repos/opencypher/openCypher/assignees{/user}","branches_url":"https://api.github.com/repos/opencypher/openCypher/branches{/branch}","tags_url":"https://api.github.com/repos/opencypher/openCypher/tags","blobs_url":"https://api.github.com/repos/opencypher/openCypher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencypher/openCypher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencypher/openCypher/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencypher/openCypher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencypher/openCypher/statuses/{sha}","languages_url":"https://api.github.com/repos/opencypher/openCypher/languages","stargazers_url":"https://api.github.com/repos/opencypher/openCypher/stargazers","contributors_url":"https://api.github.com/repos/opencypher/openCypher/contributors","subscribers_url":"https://api.github.com/repos/opencypher/openCypher/subscribers","subscription_url":"https://api.github.com/repos/opencypher/openCypher/subscription","commits_url":"https://api.github.com/repos/opencypher/openCypher/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencypher/openCypher/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencypher/openCypher/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencypher/openCypher/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencypher/openCypher/contents/{+path}","compare_url":"https://api.github.com/repos/opencypher/openCypher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencypher/openCypher/merges","archive_url":"https://api.github.com/repos/opencypher/openCypher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencypher/openCypher/downloads","issues_url":"https://api.github.com/repos/opencypher/openCypher/issues{/number}","pulls_url":"https://api.github.com/repos/opencypher/openCypher/pulls{/number}","milestones_url":"https://api.github.com/repos/opencypher/openCypher/milestones{/number}","notifications_url":"https://api.github.com/repos/opencypher/openCypher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencypher/openCypher/labels{/name}","releases_url":"https://api.github.com/repos/opencypher/openCypher/releases{/id}","deployments_url":"https://api.github.com/repos/opencypher/openCypher/deployments","created_at":"2015-02-06T09:35:42Z","updated_at":"2017-02-24T02:18:08Z","pushed_at":"2017-02-28T16:23:37Z","git_url":"git://github.com/opencypher/openCypher.git","ssh_url":"git@github.com:opencypher/openCypher.git","clone_url":"https://github.com/opencypher/openCypher.git","svn_url":"https://github.com/opencypher/openCypher","homepage":"http://www.opencypher.org","size":2565,"stargazers_count":145,"watchers_count":145,"language":"Gherkin","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":35,"forks":26,"open_issues":35,"watchers":145,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencypher/openCypher/pulls/17"},"html":{"href":"https://github.com/opencypher/openCypher/pull/17"},"issue":{"href":"https://api.github.com/repos/opencypher/openCypher/issues/17"},"comments":{"href":"https://api.github.com/repos/opencypher/openCypher/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/opencypher/openCypher/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/opencypher/openCypher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencypher/openCypher/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/opencypher/openCypher/statuses/4ed1014243ef40a4f0677c5706b75219d5729310"}}}}
{"actor":{"display_login":"boggle"}}