{"action":"created","comment":{"url":"https://api.github.com/repos/Originate/scalypher/pulls/comments/33482993","id":33482993,"diff_hunk":"@@ -1,10 +1,32 @@\n package com.originate.scalypher.where\n \n import com.originate.scalypher.ConstantString\n+import com.originate.scalypher.path.Path\n import com.originate.scalypher.ToQuery\n \n-sealed trait Predicate extends ToQuery\n+case class PredicateWithProjection(\n+  predicate: Predicate,\n+  projection: PathProjection\n+) {\n+  def where(f: ObjectReference => Where): PredicateCondition =","path":"src/main/scala/where/Predicate.scala","position":12,"original_position":12,"commit_id":"1af7e22d02e798ea6f8aa06236b13a532d2dd4db","original_commit_id":"1af7e22d02e798ea6f8aa06236b13a532d2dd4db","user":{"login":"a-wortman","id":4615790,"avatar_url":"https://avatars.githubusercontent.com/u/4615790?v=3","gravatar_id":"","url":"https://api.github.com/users/a-wortman","html_url":"https://github.com/a-wortman","followers_url":"https://api.github.com/users/a-wortman/followers","following_url":"https://api.github.com/users/a-wortman/following{/other_user}","gists_url":"https://api.github.com/users/a-wortman/gists{/gist_id}","starred_url":"https://api.github.com/users/a-wortman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-wortman/subscriptions","organizations_url":"https://api.github.com/users/a-wortman/orgs","repos_url":"https://api.github.com/users/a-wortman/repos","events_url":"https://api.github.com/users/a-wortman/events{/privacy}","received_events_url":"https://api.github.com/users/a-wortman/received_events","type":"User","site_admin":false},"body":"I think you can cover this nicely by adding a type parameter on `PredicateWithProjection` to propagate what you're working with exactly, then using that here:\r\n```\r\ncase class PredicateWithProjection[Ref]( ... ) {\r\n  def where(f: Ref => Where): PredicateCondition[Ref] = ...\r\n\r\n...\r\nsealed trait Predicate extends ToQuery {\r\n  def nodesIn(path: Path): PredicateProjection[Seq[Node]] = ...\r\n  def nodeIn(path: Path): PredicateProjection[Node] = ...\r\n  // etc\r\n}\r\n```","created_at":"2015-06-29T16:32:54Z","updated_at":"2015-06-29T16:32:54Z","html_url":"https://github.com/Originate/scalypher/pull/7#discussion_r33482993","pull_request_url":"https://api.github.com/repos/Originate/scalypher/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/Originate/scalypher/pulls/comments/33482993"},"html":{"href":"https://github.com/Originate/scalypher/pull/7#discussion_r33482993"},"pull_request":{"href":"https://api.github.com/repos/Originate/scalypher/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/Originate/scalypher/pulls/7","id":38711150,"html_url":"https://github.com/Originate/scalypher/pull/7","diff_url":"https://github.com/Originate/scalypher/pull/7.diff","patch_url":"https://github.com/Originate/scalypher/pull/7.patch","issue_url":"https://api.github.com/repos/Originate/scalypher/issues/7","number":7,"state":"open","locked":false,"title":"Mh clean up predicate condition","user":{"login":"matthandlersux","id":72524,"avatar_url":"https://avatars.githubusercontent.com/u/72524?v=3","gravatar_id":"","url":"https://api.github.com/users/matthandlersux","html_url":"https://github.com/matthandlersux","followers_url":"https://api.github.com/users/matthandlersux/followers","following_url":"https://api.github.com/users/matthandlersux/following{/other_user}","gists_url":"https://api.github.com/users/matthandlersux/gists{/gist_id}","starred_url":"https://api.github.com/users/matthandlersux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthandlersux/subscriptions","organizations_url":"https://api.github.com/users/matthandlersux/orgs","repos_url":"https://api.github.com/users/matthandlersux/repos","events_url":"https://api.github.com/users/matthandlersux/events{/privacy}","received_events_url":"https://api.github.com/users/matthandlersux/received_events","type":"User","site_admin":false},"body":"this PR just makes predicate condition usage a bit cleaner and adds specs. also updated the README\r\n\r\n@a-wortman plz","created_at":"2015-06-27T15:35:44Z","updated_at":"2015-06-29T16:32:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"080f020b94385c26874003ac1d12d0ffe0548d9e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Originate/scalypher/pulls/7/commits","review_comments_url":"https://api.github.com/repos/Originate/scalypher/pulls/7/comments","review_comment_url":"https://api.github.com/repos/Originate/scalypher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Originate/scalypher/issues/7/comments","statuses_url":"https://api.github.com/repos/Originate/scalypher/statuses/1af7e22d02e798ea6f8aa06236b13a532d2dd4db","head":{"label":"Originate:mh-clean-up-predicate-condition","ref":"mh-clean-up-predicate-condition","sha":"1af7e22d02e798ea6f8aa06236b13a532d2dd4db","user":{"login":"Originate","id":1627168,"avatar_url":"https://avatars.githubusercontent.com/u/1627168?v=3","gravatar_id":"","url":"https://api.github.com/users/Originate","html_url":"https://github.com/Originate","followers_url":"https://api.github.com/users/Originate/followers","following_url":"https://api.github.com/users/Originate/following{/other_user}","gists_url":"https://api.github.com/users/Originate/gists{/gist_id}","starred_url":"https://api.github.com/users/Originate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Originate/subscriptions","organizations_url":"https://api.github.com/users/Originate/orgs","repos_url":"https://api.github.com/users/Originate/repos","events_url":"https://api.github.com/users/Originate/events{/privacy}","received_events_url":"https://api.github.com/users/Originate/received_events","type":"Organization","site_admin":false},"repo":{"id":34873365,"name":"scalypher","full_name":"Originate/scalypher","owner":{"login":"Originate","id":1627168,"avatar_url":"https://avatars.githubusercontent.com/u/1627168?v=3","gravatar_id":"","url":"https://api.github.com/users/Originate","html_url":"https://github.com/Originate","followers_url":"https://api.github.com/users/Originate/followers","following_url":"https://api.github.com/users/Originate/following{/other_user}","gists_url":"https://api.github.com/users/Originate/gists{/gist_id}","starred_url":"https://api.github.com/users/Originate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Originate/subscriptions","organizations_url":"https://api.github.com/users/Originate/orgs","repos_url":"https://api.github.com/users/Originate/repos","events_url":"https://api.github.com/users/Originate/events{/privacy}","received_events_url":"https://api.github.com/users/Originate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Originate/scalypher","description":"a DSL for building neo4j cypher queries in scala","fork":false,"url":"https://api.github.com/repos/Originate/scalypher","forks_url":"https://api.github.com/repos/Originate/scalypher/forks","keys_url":"https://api.github.com/repos/Originate/scalypher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Originate/scalypher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Originate/scalypher/teams","hooks_url":"https://api.github.com/repos/Originate/scalypher/hooks","issue_events_url":"https://api.github.com/repos/Originate/scalypher/issues/events{/number}","events_url":"https://api.github.com/repos/Originate/scalypher/events","assignees_url":"https://api.github.com/repos/Originate/scalypher/assignees{/user}","branches_url":"https://api.github.com/repos/Originate/scalypher/branches{/branch}","tags_url":"https://api.github.com/repos/Originate/scalypher/tags","blobs_url":"https://api.github.com/repos/Originate/scalypher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Originate/scalypher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Originate/scalypher/git/refs{/sha}","trees_url":"https://api.github.com/repos/Originate/scalypher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Originate/scalypher/statuses/{sha}","languages_url":"https://api.github.com/repos/Originate/scalypher/languages","stargazers_url":"https://api.github.com/repos/Originate/scalypher/stargazers","contributors_url":"https://api.github.com/repos/Originate/scalypher/contributors","subscribers_url":"https://api.github.com/repos/Originate/scalypher/subscribers","subscription_url":"https://api.github.com/repos/Originate/scalypher/subscription","commits_url":"https://api.github.com/repos/Originate/scalypher/commits{/sha}","git_commits_url":"https://api.github.com/repos/Originate/scalypher/git/commits{/sha}","comments_url":"https://api.github.com/repos/Originate/scalypher/comments{/number}","issue_comment_url":"https://api.github.com/repos/Originate/scalypher/issues/comments{/number}","contents_url":"https://api.github.com/repos/Originate/scalypher/contents/{+path}","compare_url":"https://api.github.com/repos/Originate/scalypher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Originate/scalypher/merges","archive_url":"https://api.github.com/repos/Originate/scalypher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Originate/scalypher/downloads","issues_url":"https://api.github.com/repos/Originate/scalypher/issues{/number}","pulls_url":"https://api.github.com/repos/Originate/scalypher/pulls{/number}","milestones_url":"https://api.github.com/repos/Originate/scalypher/milestones{/number}","notifications_url":"https://api.github.com/repos/Originate/scalypher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Originate/scalypher/labels{/name}","releases_url":"https://api.github.com/repos/Originate/scalypher/releases{/id}","created_at":"2015-04-30T19:48:59Z","updated_at":"2015-06-27T00:58:11Z","pushed_at":"2015-06-27T16:36:52Z","git_url":"git://github.com/Originate/scalypher.git","ssh_url":"git@github.com:Originate/scalypher.git","clone_url":"https://github.com/Originate/scalypher.git","svn_url":"https://github.com/Originate/scalypher","homepage":null,"size":321,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":3,"default_branch":"master"}},"base":{"label":"Originate:master","ref":"master","sha":"f4acac0f0eff6c58399eb38ecb17fab7f1b14277","user":{"login":"Originate","id":1627168,"avatar_url":"https://avatars.githubusercontent.com/u/1627168?v=3","gravatar_id":"","url":"https://api.github.com/users/Originate","html_url":"https://github.com/Originate","followers_url":"https://api.github.com/users/Originate/followers","following_url":"https://api.github.com/users/Originate/following{/other_user}","gists_url":"https://api.github.com/users/Originate/gists{/gist_id}","starred_url":"https://api.github.com/users/Originate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Originate/subscriptions","organizations_url":"https://api.github.com/users/Originate/orgs","repos_url":"https://api.github.com/users/Originate/repos","events_url":"https://api.github.com/users/Originate/events{/privacy}","received_events_url":"https://api.github.com/users/Originate/received_events","type":"Organization","site_admin":false},"repo":{"id":34873365,"name":"scalypher","full_name":"Originate/scalypher","owner":{"login":"Originate","id":1627168,"avatar_url":"https://avatars.githubusercontent.com/u/1627168?v=3","gravatar_id":"","url":"https://api.github.com/users/Originate","html_url":"https://github.com/Originate","followers_url":"https://api.github.com/users/Originate/followers","following_url":"https://api.github.com/users/Originate/following{/other_user}","gists_url":"https://api.github.com/users/Originate/gists{/gist_id}","starred_url":"https://api.github.com/users/Originate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Originate/subscriptions","organizations_url":"https://api.github.com/users/Originate/orgs","repos_url":"https://api.github.com/users/Originate/repos","events_url":"https://api.github.com/users/Originate/events{/privacy}","received_events_url":"https://api.github.com/users/Originate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Originate/scalypher","description":"a DSL for building neo4j cypher queries in scala","fork":false,"url":"https://api.github.com/repos/Originate/scalypher","forks_url":"https://api.github.com/repos/Originate/scalypher/forks","keys_url":"https://api.github.com/repos/Originate/scalypher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Originate/scalypher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Originate/scalypher/teams","hooks_url":"https://api.github.com/repos/Originate/scalypher/hooks","issue_events_url":"https://api.github.com/repos/Originate/scalypher/issues/events{/number}","events_url":"https://api.github.com/repos/Originate/scalypher/events","assignees_url":"https://api.github.com/repos/Originate/scalypher/assignees{/user}","branches_url":"https://api.github.com/repos/Originate/scalypher/branches{/branch}","tags_url":"https://api.github.com/repos/Originate/scalypher/tags","blobs_url":"https://api.github.com/repos/Originate/scalypher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Originate/scalypher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Originate/scalypher/git/refs{/sha}","trees_url":"https://api.github.com/repos/Originate/scalypher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Originate/scalypher/statuses/{sha}","languages_url":"https://api.github.com/repos/Originate/scalypher/languages","stargazers_url":"https://api.github.com/repos/Originate/scalypher/stargazers","contributors_url":"https://api.github.com/repos/Originate/scalypher/contributors","subscribers_url":"https://api.github.com/repos/Originate/scalypher/subscribers","subscription_url":"https://api.github.com/repos/Originate/scalypher/subscription","commits_url":"https://api.github.com/repos/Originate/scalypher/commits{/sha}","git_commits_url":"https://api.github.com/repos/Originate/scalypher/git/commits{/sha}","comments_url":"https://api.github.com/repos/Originate/scalypher/comments{/number}","issue_comment_url":"https://api.github.com/repos/Originate/scalypher/issues/comments{/number}","contents_url":"https://api.github.com/repos/Originate/scalypher/contents/{+path}","compare_url":"https://api.github.com/repos/Originate/scalypher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Originate/scalypher/merges","archive_url":"https://api.github.com/repos/Originate/scalypher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Originate/scalypher/downloads","issues_url":"https://api.github.com/repos/Originate/scalypher/issues{/number}","pulls_url":"https://api.github.com/repos/Originate/scalypher/pulls{/number}","milestones_url":"https://api.github.com/repos/Originate/scalypher/milestones{/number}","notifications_url":"https://api.github.com/repos/Originate/scalypher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Originate/scalypher/labels{/name}","releases_url":"https://api.github.com/repos/Originate/scalypher/releases{/id}","created_at":"2015-04-30T19:48:59Z","updated_at":"2015-06-27T00:58:11Z","pushed_at":"2015-06-27T16:36:52Z","git_url":"git://github.com/Originate/scalypher.git","ssh_url":"git@github.com:Originate/scalypher.git","clone_url":"https://github.com/Originate/scalypher.git","svn_url":"https://github.com/Originate/scalypher","homepage":null,"size":321,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Originate/scalypher/pulls/7"},"html":{"href":"https://github.com/Originate/scalypher/pull/7"},"issue":{"href":"https://api.github.com/repos/Originate/scalypher/issues/7"},"comments":{"href":"https://api.github.com/repos/Originate/scalypher/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/Originate/scalypher/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/Originate/scalypher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Originate/scalypher/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/Originate/scalypher/statuses/1af7e22d02e798ea6f8aa06236b13a532d2dd4db"}}}}