{"action":"created","comment":{"url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls/comments/172031102","pull_request_review_id":100988736,"id":172031102,"diff_hunk":"@@ -635,4 +642,31 @@ protected SolrJSONResultSet findSolrResultSet(ResultSet results)\n \n         return null;\n     }\n+    public CollectionWithPagingInfo<TupleList> toCollectionWithPagingInfo(JSONArray docs, SearchSQLQuery searchQuery) throws JSONException\n+    {\n+        if(docs == null)\n+        {\n+            throw new RuntimeException(\"Solr response is required instead of docs:\" + docs);\n+        }\n+        List<TupleList> entries = new ArrayList<TupleList>();\n+        for(int i = 0; i < docs.length() -1; i++)\n+        {\n+            List<TupleEntry> row = new ArrayList<TupleEntry>();\n+            JSONObject docObj = (JSONObject) docs.get(i);\n+            docObj.keys().forEachRemaining(action -> {\n+                try\n+                {\n+                    String value = docObj.get(action.toString()).toString();\n+                    row.add(new TupleEntry(action.toString(), value));\n+                } \n+                catch (JSONException e)\n+                {\n+                    throw new RuntimeException(\"Unable to parse SQL response. \" + e);\n+                }\n+            });\n+            entries.add(new TupleList(row));\n+        }\n+        Paging paging  = Paging.valueOf(0, 1000);","path":"src/main/java/org/alfresco/rest/api/search/impl/ResultMapper.java","position":51,"original_position":51,"commit_id":"70bff32676aa4f31b9b0877aa9ce41be89d27683","original_commit_id":"70bff32676aa4f31b9b0877aa9ce41be89d27683","user":{"login":"tunaaksoy","id":4615249,"avatar_url":"https://avatars3.githubusercontent.com/u/4615249?v=4","gravatar_id":"","url":"https://api.github.com/users/tunaaksoy","html_url":"https://github.com/tunaaksoy","followers_url":"https://api.github.com/users/tunaaksoy/followers","following_url":"https://api.github.com/users/tunaaksoy/following{/other_user}","gists_url":"https://api.github.com/users/tunaaksoy/gists{/gist_id}","starred_url":"https://api.github.com/users/tunaaksoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunaaksoy/subscriptions","organizations_url":"https://api.github.com/users/tunaaksoy/orgs","repos_url":"https://api.github.com/users/tunaaksoy/repos","events_url":"https://api.github.com/users/tunaaksoy/events{/privacy}","received_events_url":"https://api.github.com/users/tunaaksoy/received_events","type":"User","site_admin":false},"body":"Hard coded value of 1000? Were you maybe planning to get the paging value form searchQuery?","created_at":"2018-03-03T22:46:39Z","updated_at":"2018-03-03T23:00:32Z","html_url":"https://github.com/Alfresco/alfresco-remote-api/pull/48#discussion_r172031102","pull_request_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls/48","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls/comments/172031102"},"html":{"href":"https://github.com/Alfresco/alfresco-remote-api/pull/48#discussion_r172031102"},"pull_request":{"href":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls/48","id":172273239,"html_url":"https://github.com/Alfresco/alfresco-remote-api/pull/48","diff_url":"https://github.com/Alfresco/alfresco-remote-api/pull/48.diff","patch_url":"https://github.com/Alfresco/alfresco-remote-api/pull/48.patch","issue_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/issues/48","number":48,"state":"open","locked":false,"title":"Feature/search 577 adding sql api","user":{"login":"michaelsuzukisagi","id":2110513,"avatar_url":"https://avatars1.githubusercontent.com/u/2110513?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelsuzukisagi","html_url":"https://github.com/michaelsuzukisagi","followers_url":"https://api.github.com/users/michaelsuzukisagi/followers","following_url":"https://api.github.com/users/michaelsuzukisagi/following{/other_user}","gists_url":"https://api.github.com/users/michaelsuzukisagi/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelsuzukisagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelsuzukisagi/subscriptions","organizations_url":"https://api.github.com/users/michaelsuzukisagi/orgs","repos_url":"https://api.github.com/users/michaelsuzukisagi/repos","events_url":"https://api.github.com/users/michaelsuzukisagi/events{/privacy}","received_events_url":"https://api.github.com/users/michaelsuzukisagi/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-01T15:43:40Z","updated_at":"2018-03-03T23:00:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"tunaaksoy","id":4615249,"avatar_url":"https://avatars3.githubusercontent.com/u/4615249?v=4","gravatar_id":"","url":"https://api.github.com/users/tunaaksoy","html_url":"https://github.com/tunaaksoy","followers_url":"https://api.github.com/users/tunaaksoy/followers","following_url":"https://api.github.com/users/tunaaksoy/following{/other_user}","gists_url":"https://api.github.com/users/tunaaksoy/gists{/gist_id}","starred_url":"https://api.github.com/users/tunaaksoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunaaksoy/subscriptions","organizations_url":"https://api.github.com/users/tunaaksoy/orgs","repos_url":"https://api.github.com/users/tunaaksoy/repos","events_url":"https://api.github.com/users/tunaaksoy/events{/privacy}","received_events_url":"https://api.github.com/users/tunaaksoy/received_events","type":"User","site_admin":false},"assignees":[{"login":"tunaaksoy","id":4615249,"avatar_url":"https://avatars3.githubusercontent.com/u/4615249?v=4","gravatar_id":"","url":"https://api.github.com/users/tunaaksoy","html_url":"https://github.com/tunaaksoy","followers_url":"https://api.github.com/users/tunaaksoy/followers","following_url":"https://api.github.com/users/tunaaksoy/following{/other_user}","gists_url":"https://api.github.com/users/tunaaksoy/gists{/gist_id}","starred_url":"https://api.github.com/users/tunaaksoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunaaksoy/subscriptions","organizations_url":"https://api.github.com/users/tunaaksoy/orgs","repos_url":"https://api.github.com/users/tunaaksoy/repos","events_url":"https://api.github.com/users/tunaaksoy/events{/privacy}","received_events_url":"https://api.github.com/users/tunaaksoy/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"andyhind","id":6787322,"avatar_url":"https://avatars2.githubusercontent.com/u/6787322?v=4","gravatar_id":"","url":"https://api.github.com/users/andyhind","html_url":"https://github.com/andyhind","followers_url":"https://api.github.com/users/andyhind/followers","following_url":"https://api.github.com/users/andyhind/following{/other_user}","gists_url":"https://api.github.com/users/andyhind/gists{/gist_id}","starred_url":"https://api.github.com/users/andyhind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyhind/subscriptions","organizations_url":"https://api.github.com/users/andyhind/orgs","repos_url":"https://api.github.com/users/andyhind/repos","events_url":"https://api.github.com/users/andyhind/events{/privacy}","received_events_url":"https://api.github.com/users/andyhind/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls/48/commits","review_comments_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls/48/comments","review_comment_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/issues/48/comments","statuses_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/statuses/70bff32676aa4f31b9b0877aa9ce41be89d27683","head":{"label":"Alfresco:feature/SEARCH-577-Adding-SQL-API","ref":"feature/SEARCH-577-Adding-SQL-API","sha":"70bff32676aa4f31b9b0877aa9ce41be89d27683","user":{"login":"Alfresco","id":391127,"avatar_url":"https://avatars2.githubusercontent.com/u/391127?v=4","gravatar_id":"","url":"https://api.github.com/users/Alfresco","html_url":"https://github.com/Alfresco","followers_url":"https://api.github.com/users/Alfresco/followers","following_url":"https://api.github.com/users/Alfresco/following{/other_user}","gists_url":"https://api.github.com/users/Alfresco/gists{/gist_id}","starred_url":"https://api.github.com/users/Alfresco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alfresco/subscriptions","organizations_url":"https://api.github.com/users/Alfresco/orgs","repos_url":"https://api.github.com/users/Alfresco/repos","events_url":"https://api.github.com/users/Alfresco/events{/privacy}","received_events_url":"https://api.github.com/users/Alfresco/received_events","type":"Organization","site_admin":false},"repo":{"id":98433624,"name":"alfresco-remote-api","full_name":"Alfresco/alfresco-remote-api","owner":{"login":"Alfresco","id":391127,"avatar_url":"https://avatars2.githubusercontent.com/u/391127?v=4","gravatar_id":"","url":"https://api.github.com/users/Alfresco","html_url":"https://github.com/Alfresco","followers_url":"https://api.github.com/users/Alfresco/followers","following_url":"https://api.github.com/users/Alfresco/following{/other_user}","gists_url":"https://api.github.com/users/Alfresco/gists{/gist_id}","starred_url":"https://api.github.com/users/Alfresco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alfresco/subscriptions","organizations_url":"https://api.github.com/users/Alfresco/orgs","repos_url":"https://api.github.com/users/Alfresco/repos","events_url":"https://api.github.com/users/Alfresco/events{/privacy}","received_events_url":"https://api.github.com/users/Alfresco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Alfresco/alfresco-remote-api","description":null,"fork":false,"url":"https://api.github.com/repos/Alfresco/alfresco-remote-api","forks_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/forks","keys_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/teams","hooks_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/hooks","issue_events_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/issues/events{/number}","events_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/events","assignees_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/assignees{/user}","branches_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/branches{/branch}","tags_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/tags","blobs_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/statuses/{sha}","languages_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/languages","stargazers_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/stargazers","contributors_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/contributors","subscribers_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/subscribers","subscription_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/subscription","commits_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/contents/{+path}","compare_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/merges","archive_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/downloads","issues_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/issues{/number}","pulls_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls{/number}","milestones_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/milestones{/number}","notifications_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/labels{/name}","releases_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/releases{/id}","deployments_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/deployments","created_at":"2017-07-26T14:43:20Z","updated_at":"2018-02-20T16:59:09Z","pushed_at":"2018-03-02T11:33:21Z","git_url":"git://github.com/Alfresco/alfresco-remote-api.git","ssh_url":"git@github.com:Alfresco/alfresco-remote-api.git","clone_url":"https://github.com/Alfresco/alfresco-remote-api.git","svn_url":"https://github.com/Alfresco/alfresco-remote-api","homepage":null,"size":39399,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":2,"open_issues":2,"watchers":6,"default_branch":"master"}},"base":{"label":"Alfresco:master","ref":"master","sha":"6586555b5486c11746fa791535a1f372df97813e","user":{"login":"Alfresco","id":391127,"avatar_url":"https://avatars2.githubusercontent.com/u/391127?v=4","gravatar_id":"","url":"https://api.github.com/users/Alfresco","html_url":"https://github.com/Alfresco","followers_url":"https://api.github.com/users/Alfresco/followers","following_url":"https://api.github.com/users/Alfresco/following{/other_user}","gists_url":"https://api.github.com/users/Alfresco/gists{/gist_id}","starred_url":"https://api.github.com/users/Alfresco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alfresco/subscriptions","organizations_url":"https://api.github.com/users/Alfresco/orgs","repos_url":"https://api.github.com/users/Alfresco/repos","events_url":"https://api.github.com/users/Alfresco/events{/privacy}","received_events_url":"https://api.github.com/users/Alfresco/received_events","type":"Organization","site_admin":false},"repo":{"id":98433624,"name":"alfresco-remote-api","full_name":"Alfresco/alfresco-remote-api","owner":{"login":"Alfresco","id":391127,"avatar_url":"https://avatars2.githubusercontent.com/u/391127?v=4","gravatar_id":"","url":"https://api.github.com/users/Alfresco","html_url":"https://github.com/Alfresco","followers_url":"https://api.github.com/users/Alfresco/followers","following_url":"https://api.github.com/users/Alfresco/following{/other_user}","gists_url":"https://api.github.com/users/Alfresco/gists{/gist_id}","starred_url":"https://api.github.com/users/Alfresco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alfresco/subscriptions","organizations_url":"https://api.github.com/users/Alfresco/orgs","repos_url":"https://api.github.com/users/Alfresco/repos","events_url":"https://api.github.com/users/Alfresco/events{/privacy}","received_events_url":"https://api.github.com/users/Alfresco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Alfresco/alfresco-remote-api","description":null,"fork":false,"url":"https://api.github.com/repos/Alfresco/alfresco-remote-api","forks_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/forks","keys_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/teams","hooks_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/hooks","issue_events_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/issues/events{/number}","events_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/events","assignees_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/assignees{/user}","branches_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/branches{/branch}","tags_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/tags","blobs_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/statuses/{sha}","languages_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/languages","stargazers_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/stargazers","contributors_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/contributors","subscribers_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/subscribers","subscription_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/subscription","commits_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/contents/{+path}","compare_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/merges","archive_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/downloads","issues_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/issues{/number}","pulls_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls{/number}","milestones_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/milestones{/number}","notifications_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/labels{/name}","releases_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/releases{/id}","deployments_url":"https://api.github.com/repos/Alfresco/alfresco-remote-api/deployments","created_at":"2017-07-26T14:43:20Z","updated_at":"2018-02-20T16:59:09Z","pushed_at":"2018-03-02T11:33:21Z","git_url":"git://github.com/Alfresco/alfresco-remote-api.git","ssh_url":"git@github.com:Alfresco/alfresco-remote-api.git","clone_url":"https://github.com/Alfresco/alfresco-remote-api.git","svn_url":"https://github.com/Alfresco/alfresco-remote-api","homepage":null,"size":39399,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":2,"open_issues":2,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls/48"},"html":{"href":"https://github.com/Alfresco/alfresco-remote-api/pull/48"},"issue":{"href":"https://api.github.com/repos/Alfresco/alfresco-remote-api/issues/48"},"comments":{"href":"https://api.github.com/repos/Alfresco/alfresco-remote-api/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Alfresco/alfresco-remote-api/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/Alfresco/alfresco-remote-api/statuses/70bff32676aa4f31b9b0877aa9ce41be89d27683"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tunaaksoy"}}