{"action":"created","comment":{"url":"https://api.github.com/repos/neo4j/cypher-shell/pulls/comments/78710886","id":78710886,"diff_hunk":"@@ -109,35 +96,37 @@ private static String toString(Path path) {\n \n     private static String toString(List<String> list) {\n         StringBuilder sb = new StringBuilder(\"[\");\n-\n-        for (String item : list) {\n-            if (sb.length() > 1) {\n-                sb.append(\", \");\n-            }\n-            sb.append(item);\n-        }\n-\n+        sb.append(list.stream().collect(Collectors.joining(COMMA_SEPARATOR)));\n         return sb.append(\"]\").toString();\n     }\n \n     private static String toString(Map<String, Object> map) {\n         StringBuilder sb = new StringBuilder(\"{\");\n-\n-        for (String key : map.keySet()) {\n-            if (sb.length() > 1) {\n-                sb.append(\", \");\n-            }\n-            sb.append(key).append(\": \").append(map.get(key));\n-        }\n-\n+        sb.append(\n+                map.keySet().stream()\n+                        .map(e -> e + \": \" + map.get(e))","path":"cypher-shell/src/main/java/org/neo4j/shell/prettyprint/PrettyPrinter.java","position":159,"original_position":159,"commit_id":"f09ee8fdfe2348b9512147ac6580d94c1ea37331","original_commit_id":"f09ee8fdfe2348b9512147ac6580d94c1ea37331","user":{"login":"spacecowboy","id":223655,"avatar_url":"https://avatars.githubusercontent.com/u/223655?v=3","gravatar_id":"","url":"https://api.github.com/users/spacecowboy","html_url":"https://github.com/spacecowboy","followers_url":"https://api.github.com/users/spacecowboy/followers","following_url":"https://api.github.com/users/spacecowboy/following{/other_user}","gists_url":"https://api.github.com/users/spacecowboy/gists{/gist_id}","starred_url":"https://api.github.com/users/spacecowboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacecowboy/subscriptions","organizations_url":"https://api.github.com/users/spacecowboy/orgs","repos_url":"https://api.github.com/users/spacecowboy/repos","events_url":"https://api.github.com/users/spacecowboy/events{/privacy}","received_events_url":"https://api.github.com/users/spacecowboy/received_events","type":"User","site_admin":false},"body":"Also, maybe this should also be a string constant like COMMA_SEPARATOR?","created_at":"2016-09-14T09:00:52Z","updated_at":"2016-09-14T09:00:52Z","html_url":"https://github.com/neo4j/cypher-shell/pull/44#discussion_r78710886","pull_request_url":"https://api.github.com/repos/neo4j/cypher-shell/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/neo4j/cypher-shell/pulls/comments/78710886"},"html":{"href":"https://github.com/neo4j/cypher-shell/pull/44#discussion_r78710886"},"pull_request":{"href":"https://api.github.com/repos/neo4j/cypher-shell/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/neo4j/cypher-shell/pulls/44","id":85074212,"html_url":"https://github.com/neo4j/cypher-shell/pull/44","diff_url":"https://github.com/neo4j/cypher-shell/pull/44.diff","patch_url":"https://github.com/neo4j/cypher-shell/pull/44.patch","issue_url":"https://api.github.com/repos/neo4j/cypher-shell/issues/44","number":44,"state":"open","locked":false,"title":"Simple output","user":{"login":"praveenag","id":339793,"avatar_url":"https://avatars.githubusercontent.com/u/339793?v=3","gravatar_id":"","url":"https://api.github.com/users/praveenag","html_url":"https://github.com/praveenag","followers_url":"https://api.github.com/users/praveenag/followers","following_url":"https://api.github.com/users/praveenag/following{/other_user}","gists_url":"https://api.github.com/users/praveenag/gists{/gist_id}","starred_url":"https://api.github.com/users/praveenag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praveenag/subscriptions","organizations_url":"https://api.github.com/users/praveenag/orgs","repos_url":"https://api.github.com/users/praveenag/repos","events_url":"https://api.github.com/users/praveenag/events{/privacy}","received_events_url":"https://api.github.com/users/praveenag/received_events","type":"User","site_admin":false},"body":"Better output from cypher-shell\r\n\r\n* Nodes and Relationships\r\n\r\n```\r\nneo4j> MATCH (p:Person)-[r:WORKS_AT]->(d:Dept) RETURN p,d,r LIMIT 2;\r\np,d,r\r\n{name: \"Frank\",labels: [Person,Entity]},{name: \"IT-Department\",labels: [Dept]},{hoursPerWeek: 40,type: WORKS_AT}\r\n{name: \"Bruce\",labels: [Person,Entity]},{name: \"IT-Department\",labels: [Dept]},{hoursPerWeek: 40,type: WORKS_AT}\r\nneo4j>\r\n```\r\n\r\n* Paths\r\n```\r\nneo4j> MATCH p=(a:Person)-[:WORKS_AT]->(d)<-[:WORKS_AT]-(b:Person) WHERE a.name = \"Daniel\" RETURN p LIMIT 2;\r\np\r\n[{name: \"Daniel\",labels: [Person]},{type: WORKS_AT},{name: \"GraphIT\",labels: [Org]},{type: WORKS_AT},{name: \"Gabriele\",labels: [Person]}]\r\n[{name: \"Daniel\",labels: [Person]},{type: WORKS_AT},{name: \"GraphIT\",labels: [Org]},{type: WORKS_AT},{name: \"Jerry\",labels: [Person]}]\r\nneo4j>\r\n```\r\n\r\n* Lists\r\n```\r\nneo4j> RETURN [1,2,3];\r\n[1,2,3]\r\n[1,2,3]\r\n\r\n```\r\n\r\nAlso included in this PR: Ability to run `make launch` now runs gradle clean, installs and connects to a running instance of neo4j.","created_at":"2016-09-13T15:46:38Z","updated_at":"2016-09-14T09:00:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0420c4c98faaa22ccfbeedaf3ab5f5d9831e150","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/neo4j/cypher-shell/pulls/44/commits","review_comments_url":"https://api.github.com/repos/neo4j/cypher-shell/pulls/44/comments","review_comment_url":"https://api.github.com/repos/neo4j/cypher-shell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neo4j/cypher-shell/issues/44/comments","statuses_url":"https://api.github.com/repos/neo4j/cypher-shell/statuses/f09ee8fdfe2348b9512147ac6580d94c1ea37331","head":{"label":"praveenag:simple_output","ref":"simple_output","sha":"f09ee8fdfe2348b9512147ac6580d94c1ea37331","user":{"login":"praveenag","id":339793,"avatar_url":"https://avatars.githubusercontent.com/u/339793?v=3","gravatar_id":"","url":"https://api.github.com/users/praveenag","html_url":"https://github.com/praveenag","followers_url":"https://api.github.com/users/praveenag/followers","following_url":"https://api.github.com/users/praveenag/following{/other_user}","gists_url":"https://api.github.com/users/praveenag/gists{/gist_id}","starred_url":"https://api.github.com/users/praveenag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praveenag/subscriptions","organizations_url":"https://api.github.com/users/praveenag/orgs","repos_url":"https://api.github.com/users/praveenag/repos","events_url":"https://api.github.com/users/praveenag/events{/privacy}","received_events_url":"https://api.github.com/users/praveenag/received_events","type":"User","site_admin":false},"repo":{"id":63684347,"name":"cypher-shell","full_name":"praveenag/cypher-shell","owner":{"login":"praveenag","id":339793,"avatar_url":"https://avatars.githubusercontent.com/u/339793?v=3","gravatar_id":"","url":"https://api.github.com/users/praveenag","html_url":"https://github.com/praveenag","followers_url":"https://api.github.com/users/praveenag/followers","following_url":"https://api.github.com/users/praveenag/following{/other_user}","gists_url":"https://api.github.com/users/praveenag/gists{/gist_id}","starred_url":"https://api.github.com/users/praveenag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praveenag/subscriptions","organizations_url":"https://api.github.com/users/praveenag/orgs","repos_url":"https://api.github.com/users/praveenag/repos","events_url":"https://api.github.com/users/praveenag/events{/privacy}","received_events_url":"https://api.github.com/users/praveenag/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/praveenag/cypher-shell","description":"A command line shell where you can execute Cypher against an instance of Neo4j","fork":true,"url":"https://api.github.com/repos/praveenag/cypher-shell","forks_url":"https://api.github.com/repos/praveenag/cypher-shell/forks","keys_url":"https://api.github.com/repos/praveenag/cypher-shell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praveenag/cypher-shell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praveenag/cypher-shell/teams","hooks_url":"https://api.github.com/repos/praveenag/cypher-shell/hooks","issue_events_url":"https://api.github.com/repos/praveenag/cypher-shell/issues/events{/number}","events_url":"https://api.github.com/repos/praveenag/cypher-shell/events","assignees_url":"https://api.github.com/repos/praveenag/cypher-shell/assignees{/user}","branches_url":"https://api.github.com/repos/praveenag/cypher-shell/branches{/branch}","tags_url":"https://api.github.com/repos/praveenag/cypher-shell/tags","blobs_url":"https://api.github.com/repos/praveenag/cypher-shell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praveenag/cypher-shell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praveenag/cypher-shell/git/refs{/sha}","trees_url":"https://api.github.com/repos/praveenag/cypher-shell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praveenag/cypher-shell/statuses/{sha}","languages_url":"https://api.github.com/repos/praveenag/cypher-shell/languages","stargazers_url":"https://api.github.com/repos/praveenag/cypher-shell/stargazers","contributors_url":"https://api.github.com/repos/praveenag/cypher-shell/contributors","subscribers_url":"https://api.github.com/repos/praveenag/cypher-shell/subscribers","subscription_url":"https://api.github.com/repos/praveenag/cypher-shell/subscription","commits_url":"https://api.github.com/repos/praveenag/cypher-shell/commits{/sha}","git_commits_url":"https://api.github.com/repos/praveenag/cypher-shell/git/commits{/sha}","comments_url":"https://api.github.com/repos/praveenag/cypher-shell/comments{/number}","issue_comment_url":"https://api.github.com/repos/praveenag/cypher-shell/issues/comments{/number}","contents_url":"https://api.github.com/repos/praveenag/cypher-shell/contents/{+path}","compare_url":"https://api.github.com/repos/praveenag/cypher-shell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praveenag/cypher-shell/merges","archive_url":"https://api.github.com/repos/praveenag/cypher-shell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praveenag/cypher-shell/downloads","issues_url":"https://api.github.com/repos/praveenag/cypher-shell/issues{/number}","pulls_url":"https://api.github.com/repos/praveenag/cypher-shell/pulls{/number}","milestones_url":"https://api.github.com/repos/praveenag/cypher-shell/milestones{/number}","notifications_url":"https://api.github.com/repos/praveenag/cypher-shell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praveenag/cypher-shell/labels{/name}","releases_url":"https://api.github.com/repos/praveenag/cypher-shell/releases{/id}","deployments_url":"https://api.github.com/repos/praveenag/cypher-shell/deployments","created_at":"2016-07-19T10:24:44Z","updated_at":"2016-07-19T10:24:46Z","pushed_at":"2016-09-14T08:35:18Z","git_url":"git://github.com/praveenag/cypher-shell.git","ssh_url":"git@github.com:praveenag/cypher-shell.git","clone_url":"https://github.com/praveenag/cypher-shell.git","svn_url":"https://github.com/praveenag/cypher-shell","homepage":null,"size":469,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"neo4j:master","ref":"master","sha":"fe55e61b6f6790da9741d54ca0f18d64a7e87df6","user":{"login":"neo4j","id":201120,"avatar_url":"https://avatars.githubusercontent.com/u/201120?v=3","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"repo":{"id":61703365,"name":"cypher-shell","full_name":"neo4j/cypher-shell","owner":{"login":"neo4j","id":201120,"avatar_url":"https://avatars.githubusercontent.com/u/201120?v=3","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neo4j/cypher-shell","description":"A command line shell where you can execute Cypher against an instance of Neo4j","fork":false,"url":"https://api.github.com/repos/neo4j/cypher-shell","forks_url":"https://api.github.com/repos/neo4j/cypher-shell/forks","keys_url":"https://api.github.com/repos/neo4j/cypher-shell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neo4j/cypher-shell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neo4j/cypher-shell/teams","hooks_url":"https://api.github.com/repos/neo4j/cypher-shell/hooks","issue_events_url":"https://api.github.com/repos/neo4j/cypher-shell/issues/events{/number}","events_url":"https://api.github.com/repos/neo4j/cypher-shell/events","assignees_url":"https://api.github.com/repos/neo4j/cypher-shell/assignees{/user}","branches_url":"https://api.github.com/repos/neo4j/cypher-shell/branches{/branch}","tags_url":"https://api.github.com/repos/neo4j/cypher-shell/tags","blobs_url":"https://api.github.com/repos/neo4j/cypher-shell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neo4j/cypher-shell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neo4j/cypher-shell/git/refs{/sha}","trees_url":"https://api.github.com/repos/neo4j/cypher-shell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neo4j/cypher-shell/statuses/{sha}","languages_url":"https://api.github.com/repos/neo4j/cypher-shell/languages","stargazers_url":"https://api.github.com/repos/neo4j/cypher-shell/stargazers","contributors_url":"https://api.github.com/repos/neo4j/cypher-shell/contributors","subscribers_url":"https://api.github.com/repos/neo4j/cypher-shell/subscribers","subscription_url":"https://api.github.com/repos/neo4j/cypher-shell/subscription","commits_url":"https://api.github.com/repos/neo4j/cypher-shell/commits{/sha}","git_commits_url":"https://api.github.com/repos/neo4j/cypher-shell/git/commits{/sha}","comments_url":"https://api.github.com/repos/neo4j/cypher-shell/comments{/number}","issue_comment_url":"https://api.github.com/repos/neo4j/cypher-shell/issues/comments{/number}","contents_url":"https://api.github.com/repos/neo4j/cypher-shell/contents/{+path}","compare_url":"https://api.github.com/repos/neo4j/cypher-shell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neo4j/cypher-shell/merges","archive_url":"https://api.github.com/repos/neo4j/cypher-shell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neo4j/cypher-shell/downloads","issues_url":"https://api.github.com/repos/neo4j/cypher-shell/issues{/number}","pulls_url":"https://api.github.com/repos/neo4j/cypher-shell/pulls{/number}","milestones_url":"https://api.github.com/repos/neo4j/cypher-shell/milestones{/number}","notifications_url":"https://api.github.com/repos/neo4j/cypher-shell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neo4j/cypher-shell/labels{/name}","releases_url":"https://api.github.com/repos/neo4j/cypher-shell/releases{/id}","deployments_url":"https://api.github.com/repos/neo4j/cypher-shell/deployments","created_at":"2016-06-22T08:43:36Z","updated_at":"2016-09-05T02:12:47Z","pushed_at":"2016-09-14T08:52:38Z","git_url":"git://github.com/neo4j/cypher-shell.git","ssh_url":"git@github.com:neo4j/cypher-shell.git","clone_url":"https://github.com/neo4j/cypher-shell.git","svn_url":"https://github.com/neo4j/cypher-shell","homepage":null,"size":528,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":3,"forks":5,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neo4j/cypher-shell/pulls/44"},"html":{"href":"https://github.com/neo4j/cypher-shell/pull/44"},"issue":{"href":"https://api.github.com/repos/neo4j/cypher-shell/issues/44"},"comments":{"href":"https://api.github.com/repos/neo4j/cypher-shell/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/neo4j/cypher-shell/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/neo4j/cypher-shell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neo4j/cypher-shell/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/neo4j/cypher-shell/statuses/f09ee8fdfe2348b9512147ac6580d94c1ea37331"}}}}
{"actor":{"display_login":"spacecowboy"}}