GitHub PullRequestReviewCommentEvent at 2014-08-19 09:28:52
Repository: jackalope-doctrine-dbal
Actor: dbu
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls/comments/16404579","id":16404579,"diff_hunk":"@@ -803,13 +800,23 @@ private function sqlXpathExtractValue($alias, $property)\n         throw new NotImplementedException(\"Xpath evaluations cannot be executed with '\" . $this->platform->getName() . \"' yet.\");\n     }\n \n-    private function sqlXpathExtractNumValue($alias, $property)\n+    private function sqlXpathCompareNumValue($alias, $property, $value, $operator)\n     {\n+        if ($this->platform instanceof SqlitePlatform) {\n+            $expression = \"EXTRACTVALUE($alias.props, 'count(//sv:property[@sv:name=\\\"\" . $property . \"\\\"]/sv:value[text()%s%s]) > 0')\";\n+\n+            return sprintf($expression, $this->walkOperator($operator), Xpath::escape($value));\n+        }\n+\n         if ($this->platform instanceof PostgreSqlPlatform) {\n-            return \"(xpath('//sv:property[@sv:name=\\\"\" . $property . \"\\\"]/sv:value[1]/text()', CAST($alias.props AS xml), \".$this->sqlXpathPostgreSQLNamespaces().\"))[1]::text::int\";\n+            $expression = \"(xpath('//sv:property[@sv:name=\\\"\" . $property . \"\\\"]/sv:value[1]/text()', CAST($alias.props AS xml), \".$this->sqlXpathPostgreSQLNamespaces().\"))[1]::text::int\";\n+        } elseif ($this->platform instanceof MySqlPlatform) {\n+            $expression = $this->sqlXpathExtractValue($alias, $property);\n+        } else {\n+            throw new NotImplementedException(\"Xpath evaluations cannot be executed with '\" . $this->platform->getName() . \"' yet.\");","path":"src/Jackalope/Transport/DoctrineDBAL/Query/QOMWalker.php","position":31,"original_position":31,"commit_id":"7a32e171814f5f251efa56395eb4708fc02c2080","original_commit_id":"7a32e171814f5f251efa56395eb4708fc02c2080","user":{"login":"dbu","id":76576,"avatar_url":"https://avatars.githubusercontent.com/u/76576?v=2","gravatar_id":"c9f4f8ce2c2936bacaf49500b5a127dc","url":"https://api.github.com/users/dbu","html_url":"https://github.com/dbu","followers_url":"https://api.github.com/users/dbu/followers","following_url":"https://api.github.com/users/dbu/following{/other_user}","gists_url":"https://api.github.com/users/dbu/gists{/gist_id}","starred_url":"https://api.github.com/users/dbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbu/subscriptions","organizations_url":"https://api.github.com/users/dbu/orgs","repos_url":"https://api.github.com/users/dbu/repos","events_url":"https://api.github.com/users/dbu/events{/privacy}","received_events_url":"https://api.github.com/users/dbu/received_events","type":"User","site_admin":false},"body":"is this not more confusing than anything else to a user? he was not trying to do xpath, he was doing query builder or sql2 - its our implementation detail that we use xpath for what he is doing.","created_at":"2014-08-19T09:28:52Z","updated_at":"2014-08-19T09:28:52Z","html_url":"https://github.com/jackalope/jackalope-doctrine-dbal/pull/207#discussion_r16404579","pull_request_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls/207","_links":{"self":{"href":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls/comments/16404579"},"html":{"href":"https://github.com/jackalope/jackalope-doctrine-dbal/pull/207#discussion_r16404579"},"pull_request":{"href":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls/207"}}},"pull_request":{"url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls/207","id":18399478,"html_url":"https://github.com/jackalope/jackalope-doctrine-dbal/pull/207","diff_url":"https://github.com/jackalope/jackalope-doctrine-dbal/pull/207.diff","patch_url":"https://github.com/jackalope/jackalope-doctrine-dbal/pull/207.patch","issue_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/issues/207","number":207,"state":"open","locked":false,"title":"fix handling of numeric values for SQLite in comparisons","user":{"login":"lsmith77","id":300279,"avatar_url":"https://avatars.githubusercontent.com/u/300279?v=2","gravatar_id":"54787afbd0e7c30936101c2fa84bd89b","url":"https://api.github.com/users/lsmith77","html_url":"https://github.com/lsmith77","followers_url":"https://api.github.com/users/lsmith77/followers","following_url":"https://api.github.com/users/lsmith77/following{/other_user}","gists_url":"https://api.github.com/users/lsmith77/gists{/gist_id}","starred_url":"https://api.github.com/users/lsmith77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsmith77/subscriptions","organizations_url":"https://api.github.com/users/lsmith77/orgs","repos_url":"https://api.github.com/users/lsmith77/repos","events_url":"https://api.github.com/users/lsmith77/events{/privacy}","received_events_url":"https://api.github.com/users/lsmith77/received_events","type":"User","site_admin":false},"body":"fixes https://github.com/jackalope/jackalope-doctrine-dbal/issues/206","created_at":"2014-07-15T10:23:53Z","updated_at":"2014-08-19T09:28:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a24f22a8ab37f7eecf00bb4128254a081e6cf4f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls/207/commits","review_comments_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls/207/comments","review_comment_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/issues/207/comments","statuses_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/statuses/7a32e171814f5f251efa56395eb4708fc02c2080","head":{"label":"jackalope:fix_sqlite_numeric_comparison","ref":"fix_sqlite_numeric_comparison","sha":"7a32e171814f5f251efa56395eb4708fc02c2080","user":{"login":"jackalope","id":70245,"avatar_url":"https://avatars.githubusercontent.com/u/70245?v=2","gravatar_id":"ca7d290483f6138def63f09daefd8f31","url":"https://api.github.com/users/jackalope","html_url":"https://github.com/jackalope","followers_url":"https://api.github.com/users/jackalope/followers","following_url":"https://api.github.com/users/jackalope/following{/other_user}","gists_url":"https://api.github.com/users/jackalope/gists{/gist_id}","starred_url":"https://api.github.com/users/jackalope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackalope/subscriptions","organizations_url":"https://api.github.com/users/jackalope/orgs","repos_url":"https://api.github.com/users/jackalope/repos","events_url":"https://api.github.com/users/jackalope/events{/privacy}","received_events_url":"https://api.github.com/users/jackalope/received_events","type":"Organization","site_admin":false},"repo":{"id":3470596,"name":"jackalope-doctrine-dbal","full_name":"jackalope/jackalope-doctrine-dbal","owner":{"login":"jackalope","id":70245,"avatar_url":"https://avatars.githubusercontent.com/u/70245?v=2","gravatar_id":"ca7d290483f6138def63f09daefd8f31","url":"https://api.github.com/users/jackalope","html_url":"https://github.com/jackalope","followers_url":"https://api.github.com/users/jackalope/followers","following_url":"https://api.github.com/users/jackalope/following{/other_user}","gists_url":"https://api.github.com/users/jackalope/gists{/gist_id}","starred_url":"https://api.github.com/users/jackalope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackalope/subscriptions","organizations_url":"https://api.github.com/users/jackalope/orgs","repos_url":"https://api.github.com/users/jackalope/repos","events_url":"https://api.github.com/users/jackalope/events{/privacy}","received_events_url":"https://api.github.com/users/jackalope/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jackalope/jackalope-doctrine-dbal","description":"Doctrine DBAL transport implementation for Jackalope","fork":false,"url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal","forks_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/forks","keys_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/teams","hooks_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/hooks","issue_events_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/issues/events{/number}","events_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/events","assignees_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/assignees{/user}","branches_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/branches{/branch}","tags_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/tags","blobs_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/git/refs{/sha}","trees_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/statuses/{sha}","languages_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/languages","stargazers_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/stargazers","contributors_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/contributors","subscribers_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/subscribers","subscription_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/subscription","commits_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/commits{/sha}","git_commits_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/git/commits{/sha}","comments_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/comments{/number}","issue_comment_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/issues/comments/{number}","contents_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/contents/{+path}","compare_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/merges","archive_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/downloads","issues_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/issues{/number}","pulls_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls{/number}","milestones_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/milestones{/number}","notifications_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/labels{/name}","releases_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/releases{/id}","created_at":"2012-02-17T14:35:21Z","updated_at":"2014-08-11T02:52:38Z","pushed_at":"2014-08-18T20:26:07Z","git_url":"git://github.com/jackalope/jackalope-doctrine-dbal.git","ssh_url":"git@github.com:jackalope/jackalope-doctrine-dbal.git","clone_url":"https://github.com/jackalope/jackalope-doctrine-dbal.git","svn_url":"https://github.com/jackalope/jackalope-doctrine-dbal","homepage":"http://jackalope.github.io","size":11431,"stargazers_count":45,"watchers_count":45,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":32,"mirror_url":null,"open_issues_count":24,"forks":32,"open_issues":24,"watchers":45,"default_branch":"master"}},"base":{"label":"jackalope:master","ref":"master","sha":"2b08c31be0e492980977055a078e7a31f24b1241","user":{"login":"jackalope","id":70245,"avatar_url":"https://avatars.githubusercontent.com/u/70245?v=2","gravatar_id":"ca7d290483f6138def63f09daefd8f31","url":"https://api.github.com/users/jackalope","html_url":"https://github.com/jackalope","followers_url":"https://api.github.com/users/jackalope/followers","following_url":"https://api.github.com/users/jackalope/following{/other_user}","gists_url":"https://api.github.com/users/jackalope/gists{/gist_id}","starred_url":"https://api.github.com/users/jackalope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackalope/subscriptions","organizations_url":"https://api.github.com/users/jackalope/orgs","repos_url":"https://api.github.com/users/jackalope/repos","events_url":"https://api.github.com/users/jackalope/events{/privacy}","received_events_url":"https://api.github.com/users/jackalope/received_events","type":"Organization","site_admin":false},"repo":{"id":3470596,"name":"jackalope-doctrine-dbal","full_name":"jackalope/jackalope-doctrine-dbal","owner":{"login":"jackalope","id":70245,"avatar_url":"https://avatars.githubusercontent.com/u/70245?v=2","gravatar_id":"ca7d290483f6138def63f09daefd8f31","url":"https://api.github.com/users/jackalope","html_url":"https://github.com/jackalope","followers_url":"https://api.github.com/users/jackalope/followers","following_url":"https://api.github.com/users/jackalope/following{/other_user}","gists_url":"https://api.github.com/users/jackalope/gists{/gist_id}","starred_url":"https://api.github.com/users/jackalope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackalope/subscriptions","organizations_url":"https://api.github.com/users/jackalope/orgs","repos_url":"https://api.github.com/users/jackalope/repos","events_url":"https://api.github.com/users/jackalope/events{/privacy}","received_events_url":"https://api.github.com/users/jackalope/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jackalope/jackalope-doctrine-dbal","description":"Doctrine DBAL transport implementation for Jackalope","fork":false,"url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal","forks_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/forks","keys_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/teams","hooks_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/hooks","issue_events_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/issues/events{/number}","events_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/events","assignees_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/assignees{/user}","branches_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/branches{/branch}","tags_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/tags","blobs_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/git/refs{/sha}","trees_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/statuses/{sha}","languages_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/languages","stargazers_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/stargazers","contributors_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/contributors","subscribers_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/subscribers","subscription_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/subscription","commits_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/commits{/sha}","git_commits_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/git/commits{/sha}","comments_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/comments{/number}","issue_comment_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/issues/comments/{number}","contents_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/contents/{+path}","compare_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/merges","archive_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/downloads","issues_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/issues{/number}","pulls_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls{/number}","milestones_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/milestones{/number}","notifications_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/labels{/name}","releases_url":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/releases{/id}","created_at":"2012-02-17T14:35:21Z","updated_at":"2014-08-11T02:52:38Z","pushed_at":"2014-08-18T20:26:07Z","git_url":"git://github.com/jackalope/jackalope-doctrine-dbal.git","ssh_url":"git@github.com:jackalope/jackalope-doctrine-dbal.git","clone_url":"https://github.com/jackalope/jackalope-doctrine-dbal.git","svn_url":"https://github.com/jackalope/jackalope-doctrine-dbal","homepage":"http://jackalope.github.io","size":11431,"stargazers_count":45,"watchers_count":45,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":32,"mirror_url":null,"open_issues_count":24,"forks":32,"open_issues":24,"watchers":45,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls/207"},"html":{"href":"https://github.com/jackalope/jackalope-doctrine-dbal/pull/207"},"issue":{"href":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/issues/207"},"comments":{"href":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/issues/207/comments"},"review_comments":{"href":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls/207/comments"},"review_comment":{"href":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/pulls/207/commits"},"statuses":{"href":"https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/statuses/7a32e171814f5f251efa56395eb4708fc02c2080"}}}}