GitHub PullRequestReviewCommentEvent at 2014-06-22 06:25:02
Repository: arel
Actor: vipulnsward
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rails/arel/pulls/comments/14053197","id":14053197,"diff_hunk":"@@ -716,6 +716,36 @@ def test_manager_stores_bind_values\n         }\n       end\n \n+      it 'takes an order with multiple columns' do\n+        table   = Table.new :users\n+        manager = Arel::SelectManager.new Table.engine\n+        manager.from table\n+        manager.window('a_window').order(table['foo'].asc, table['bar'].desc)\n+        manager.to_sql.must_be_like %{\n+          SELECT FROM \"users\" WINDOW \"a_window\" AS (ORDER BY \"users\".\"foo\" ASC, \"users\".\"bar\" DESC)\n+        }\n+      end\n+\n+      it 'takes a partition' do\n+        table   = Table.new :users\n+        manager = Arel::SelectManager.new Table.engine\n+        manager.from table\n+        manager.window('a_window').partition(table['bar'])\n+        manager.to_sql.must_be_like %{\n+          SELECT FROM \"users\" WINDOW \"a_window\" AS (PARTITION BY \"users\".\"bar\")\n+        }\n+      end\n+\n+      it 'takes a partition with multiple columns' do\n+        table   = Table.new :users\n+        manager = Arel::SelectManager.new Table.engine\n+        manager.from table\n+        manager.window('a_window').partition(table['bar'], table['baz'])\n+        manager.to_sql.must_be_like %{\n+          SELECT FROM \"users\" WINDOW \"a_window\" AS (PARTITION BY \"users\".\"bar\", \"users\".\"baz\")\n+        }\n+      end\n+","path":"test/test_select_manager.rb","position":33,"original_position":33,"commit_id":"7e06c36df0fa3ceae069196640206a727b206d14","original_commit_id":"7e06c36df0fa3ceae069196640206a727b206d14","user":{"login":"vipulnsward","id":567626,"avatar_url":"https://avatars.githubusercontent.com/u/567626?","gravatar_id":"f459742822cf8347e83d5c445378a934","url":"https://api.github.com/users/vipulnsward","html_url":"https://github.com/vipulnsward","followers_url":"https://api.github.com/users/vipulnsward/followers","following_url":"https://api.github.com/users/vipulnsward/following{/other_user}","gists_url":"https://api.github.com/users/vipulnsward/gists{/gist_id}","starred_url":"https://api.github.com/users/vipulnsward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vipulnsward/subscriptions","organizations_url":"https://api.github.com/users/vipulnsward/orgs","repos_url":"https://api.github.com/users/vipulnsward/repos","events_url":"https://api.github.com/users/vipulnsward/events{/privacy}","received_events_url":"https://api.github.com/users/vipulnsward/received_events","type":"User","site_admin":false},"body":"@atombender would this take care of `PARTITION` and `ORDER`. If yes, would be nice to have a test for it.","created_at":"2014-06-22T06:25:02Z","updated_at":"2014-06-22T06:25:02Z","html_url":"https://github.com/rails/arel/pull/163#discussion_r14053197","pull_request_url":"https://api.github.com/repos/rails/arel/pulls/163","_links":{"self":{"href":"https://api.github.com/repos/rails/arel/pulls/comments/14053197"},"html":{"href":"https://github.com/rails/arel/pull/163#discussion_r14053197"},"pull_request":{"href":"https://api.github.com/repos/rails/arel/pulls/163"}}},"pull_request":{"url":"https://api.github.com/repos/rails/arel/pulls/163","id":4218595,"html_url":"https://github.com/rails/arel/pull/163","diff_url":"https://github.com/rails/arel/pull/163.diff","patch_url":"https://github.com/rails/arel/pull/163.patch","issue_url":"https://api.github.com/repos/rails/arel/issues/163","number":163,"state":"open","title":"Support for PARTITION BY in window","user":{"login":"atombender","id":50314,"avatar_url":"https://avatars.githubusercontent.com/u/50314?","gravatar_id":"f906d30709e12cc20c0d5b6a6c98d33d","url":"https://api.github.com/users/atombender","html_url":"https://github.com/atombender","followers_url":"https://api.github.com/users/atombender/followers","following_url":"https://api.github.com/users/atombender/following{/other_user}","gists_url":"https://api.github.com/users/atombender/gists{/gist_id}","starred_url":"https://api.github.com/users/atombender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atombender/subscriptions","organizations_url":"https://api.github.com/users/atombender/orgs","repos_url":"https://api.github.com/users/atombender/repos","events_url":"https://api.github.com/users/atombender/events{/privacy}","received_events_url":"https://api.github.com/users/atombender/received_events","type":"User","site_admin":false},"body":"Plus a minor correction to window expression building.","created_at":"2013-02-19T21:29:10Z","updated_at":"2014-06-22T06:25:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a04d9d3e2647b154ddc4db6536ff165f366463db","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/arel/pulls/163/commits","review_comments_url":"https://api.github.com/repos/rails/arel/pulls/163/comments","review_comment_url":"https://api.github.com/repos/rails/arel/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rails/arel/issues/163/comments","statuses_url":"https://api.github.com/repos/rails/arel/statuses/7e06c36df0fa3ceae069196640206a727b206d14","head":{"label":"atombender:master","ref":"master","sha":"7e06c36df0fa3ceae069196640206a727b206d14","user":{"login":"atombender","id":50314,"avatar_url":"https://avatars.githubusercontent.com/u/50314?","gravatar_id":"f906d30709e12cc20c0d5b6a6c98d33d","url":"https://api.github.com/users/atombender","html_url":"https://github.com/atombender","followers_url":"https://api.github.com/users/atombender/followers","following_url":"https://api.github.com/users/atombender/following{/other_user}","gists_url":"https://api.github.com/users/atombender/gists{/gist_id}","starred_url":"https://api.github.com/users/atombender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atombender/subscriptions","organizations_url":"https://api.github.com/users/atombender/orgs","repos_url":"https://api.github.com/users/atombender/repos","events_url":"https://api.github.com/users/atombender/events{/privacy}","received_events_url":"https://api.github.com/users/atombender/received_events","type":"User","site_admin":false},"repo":{"id":3515373,"name":"arel","full_name":"atombender/arel","owner":{"login":"atombender","id":50314,"avatar_url":"https://avatars.githubusercontent.com/u/50314?","gravatar_id":"f906d30709e12cc20c0d5b6a6c98d33d","url":"https://api.github.com/users/atombender","html_url":"https://github.com/atombender","followers_url":"https://api.github.com/users/atombender/followers","following_url":"https://api.github.com/users/atombender/following{/other_user}","gists_url":"https://api.github.com/users/atombender/gists{/gist_id}","starred_url":"https://api.github.com/users/atombender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atombender/subscriptions","organizations_url":"https://api.github.com/users/atombender/orgs","repos_url":"https://api.github.com/users/atombender/repos","events_url":"https://api.github.com/users/atombender/events{/privacy}","received_events_url":"https://api.github.com/users/atombender/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atombender/arel","description":"A Relational Algebra","fork":true,"url":"https://api.github.com/repos/atombender/arel","forks_url":"https://api.github.com/repos/atombender/arel/forks","keys_url":"https://api.github.com/repos/atombender/arel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atombender/arel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atombender/arel/teams","hooks_url":"https://api.github.com/repos/atombender/arel/hooks","issue_events_url":"https://api.github.com/repos/atombender/arel/issues/events{/number}","events_url":"https://api.github.com/repos/atombender/arel/events","assignees_url":"https://api.github.com/repos/atombender/arel/assignees{/user}","branches_url":"https://api.github.com/repos/atombender/arel/branches{/branch}","tags_url":"https://api.github.com/repos/atombender/arel/tags","blobs_url":"https://api.github.com/repos/atombender/arel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atombender/arel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atombender/arel/git/refs{/sha}","trees_url":"https://api.github.com/repos/atombender/arel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atombender/arel/statuses/{sha}","languages_url":"https://api.github.com/repos/atombender/arel/languages","stargazers_url":"https://api.github.com/repos/atombender/arel/stargazers","contributors_url":"https://api.github.com/repos/atombender/arel/contributors","subscribers_url":"https://api.github.com/repos/atombender/arel/subscribers","subscription_url":"https://api.github.com/repos/atombender/arel/subscription","commits_url":"https://api.github.com/repos/atombender/arel/commits{/sha}","git_commits_url":"https://api.github.com/repos/atombender/arel/git/commits{/sha}","comments_url":"https://api.github.com/repos/atombender/arel/comments{/number}","issue_comment_url":"https://api.github.com/repos/atombender/arel/issues/comments/{number}","contents_url":"https://api.github.com/repos/atombender/arel/contents/{+path}","compare_url":"https://api.github.com/repos/atombender/arel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atombender/arel/merges","archive_url":"https://api.github.com/repos/atombender/arel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atombender/arel/downloads","issues_url":"https://api.github.com/repos/atombender/arel/issues{/number}","pulls_url":"https://api.github.com/repos/atombender/arel/pulls{/number}","milestones_url":"https://api.github.com/repos/atombender/arel/milestones{/number}","notifications_url":"https://api.github.com/repos/atombender/arel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atombender/arel/labels{/name}","releases_url":"https://api.github.com/repos/atombender/arel/releases{/id}","created_at":"2012-02-22T14:38:07Z","updated_at":"2014-06-20T21:08:44Z","pushed_at":"2014-06-20T21:08:44Z","git_url":"git://github.com/atombender/arel.git","ssh_url":"git@github.com:atombender/arel.git","clone_url":"https://github.com/atombender/arel.git","svn_url":"https://github.com/atombender/arel","homepage":"","size":2739,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"f50de54a6f0c59ab75526cfdb7896830130ffdf7","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?","gravatar_id":"30f39a09e233e8369dddf6feb4be0308","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":337788,"name":"arel","full_name":"rails/arel","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?","gravatar_id":"30f39a09e233e8369dddf6feb4be0308","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/arel","description":"A Relational Algebra","fork":true,"url":"https://api.github.com/repos/rails/arel","forks_url":"https://api.github.com/repos/rails/arel/forks","keys_url":"https://api.github.com/repos/rails/arel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/arel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/arel/teams","hooks_url":"https://api.github.com/repos/rails/arel/hooks","issue_events_url":"https://api.github.com/repos/rails/arel/issues/events{/number}","events_url":"https://api.github.com/repos/rails/arel/events","assignees_url":"https://api.github.com/repos/rails/arel/assignees{/user}","branches_url":"https://api.github.com/repos/rails/arel/branches{/branch}","tags_url":"https://api.github.com/repos/rails/arel/tags","blobs_url":"https://api.github.com/repos/rails/arel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/arel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/arel/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/arel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/arel/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/arel/languages","stargazers_url":"https://api.github.com/repos/rails/arel/stargazers","contributors_url":"https://api.github.com/repos/rails/arel/contributors","subscribers_url":"https://api.github.com/repos/rails/arel/subscribers","subscription_url":"https://api.github.com/repos/rails/arel/subscription","commits_url":"https://api.github.com/repos/rails/arel/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/arel/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/arel/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/arel/issues/comments/{number}","contents_url":"https://api.github.com/repos/rails/arel/contents/{+path}","compare_url":"https://api.github.com/repos/rails/arel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/arel/merges","archive_url":"https://api.github.com/repos/rails/arel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/arel/downloads","issues_url":"https://api.github.com/repos/rails/arel/issues{/number}","pulls_url":"https://api.github.com/repos/rails/arel/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/arel/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/arel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/arel/labels{/name}","releases_url":"https://api.github.com/repos/rails/arel/releases{/id}","created_at":"2009-10-14T23:47:40Z","updated_at":"2014-06-19T20:53:55Z","pushed_at":"2014-06-15T17:38:19Z","git_url":"git://github.com/rails/arel.git","ssh_url":"git@github.com:rails/arel.git","clone_url":"https://github.com/rails/arel.git","svn_url":"https://github.com/rails/arel","homepage":"","size":5424,"stargazers_count":1043,"watchers_count":1043,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":249,"mirror_url":null,"open_issues_count":64,"forks":249,"open_issues":64,"watchers":1043,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/arel/pulls/163"},"html":{"href":"https://github.com/rails/arel/pull/163"},"issue":{"href":"https://api.github.com/repos/rails/arel/issues/163"},"comments":{"href":"https://api.github.com/repos/rails/arel/issues/163/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/arel/pulls/163/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/arel/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rails/arel/pulls/163/commits"},"statuses":{"href":"https://api.github.com/repos/rails/arel/statuses/7e06c36df0fa3ceae069196640206a727b206d14"}}}}