{"action":"created","comment":{"url":"https://api.github.com/repos/twosigma/beaker-notebook/pulls/comments/73378426","id":73378426,"diff_hunk":"@@ -153,7 +153,7 @@ protected static String setObject(String sql, Object value){\n       String begin = sql.substring(0, index);\n       String end = sql.substring(index + 1, sql.length());\n       if(value instanceof String){\n-        ret = begin + \"\\'\" + value + \"\\'\" + end;\n+        ret = begin + \"'\" + replaseString(((String) value), \"'\", \"''\", 0) + \"'\" + end;","path":"plugin/sqlsh/src/main/java/com/twosigma/beaker/sqlsh/utils/QueryExecutor.java","position":5,"original_position":5,"commit_id":"bb1edbf8c66b097c661e46bc6be42e28b744ffd6","original_commit_id":"bb1edbf8c66b097c661e46bc6be42e28b744ffd6","user":{"login":"konstantinTarletski","id":10614633,"avatar_url":"https://avatars.githubusercontent.com/u/10614633?v=3","gravatar_id":"","url":"https://api.github.com/users/konstantinTarletski","html_url":"https://github.com/konstantinTarletski","followers_url":"https://api.github.com/users/konstantinTarletski/followers","following_url":"https://api.github.com/users/konstantinTarletski/following{/other_user}","gists_url":"https://api.github.com/users/konstantinTarletski/gists{/gist_id}","starred_url":"https://api.github.com/users/konstantinTarletski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/konstantinTarletski/subscriptions","organizations_url":"https://api.github.com/users/konstantinTarletski/orgs","repos_url":"https://api.github.com/users/konstantinTarletski/repos","events_url":"https://api.github.com/users/konstantinTarletski/events{/privacy}","received_events_url":"https://api.github.com/users/konstantinTarletski/received_events","type":"User","site_admin":false},"body":"Yes there is replaceAll method in Java. But I tried different escape\ncharacters. And for some it was difficult to write regular expressions.\nThat's why I wrote custom method. If for some reason we change escape\ncharacter  (for some DB), it will be easy. Let me know if I need to rewrite\nthis part.\n\n3 Авг 2016 г. 7:03 PM пользователь \"Scott Draves\" <notifications@github.com>\nнаписал:\n\n> In\n> plugin/sqlsh/src/main/java/com/twosigma/beaker/sqlsh/utils/QueryExecutor.java\n> <https://github.com/twosigma/beaker-notebook/pull/4591#discussion_r73344038>\n> :\n>\n> > @@ -153,7 +153,7 @@ protected static String setObject(String sql, Object value){\n> >        String begin = sql.substring(0, index);\n> >        String end = sql.substring(index + 1, sql.length());\n> >        if(value instanceof String){\n> > -        ret = begin + \"\\'\" + value + \"\\'\" + end;\n> > +        ret = begin + \"'\" + replaseString(((String) value), \"'\", \"''\", 0) + \"'\" + end;\n>\n> doesn't Java have replaceAll() method?\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/twosigma/beaker-notebook/pull/4591/files/bb1edbf8c66b097c661e46bc6be42e28b744ffd6#r73344038>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AKH3afxVi-0vsxxso8TcWwcde3vw9rPeks5qcKfqgaJpZM4JbcC8>\n> .\n>\n","created_at":"2016-08-03T17:18:35Z","updated_at":"2016-08-03T17:18:35Z","html_url":"https://github.com/twosigma/beaker-notebook/pull/4591#discussion_r73378426","pull_request_url":"https://api.github.com/repos/twosigma/beaker-notebook/pulls/4591","_links":{"self":{"href":"https://api.github.com/repos/twosigma/beaker-notebook/pulls/comments/73378426"},"html":{"href":"https://github.com/twosigma/beaker-notebook/pull/4591#discussion_r73378426"},"pull_request":{"href":"https://api.github.com/repos/twosigma/beaker-notebook/pulls/4591"}}},"pull_request":{"url":"https://api.github.com/repos/twosigma/beaker-notebook/pulls/4591","id":79869041,"html_url":"https://github.com/twosigma/beaker-notebook/pull/4591","diff_url":"https://github.com/twosigma/beaker-notebook/pull/4591.diff","patch_url":"https://github.com/twosigma/beaker-notebook/pull/4591.patch","issue_url":"https://api.github.com/repos/twosigma/beaker-notebook/issues/4591","number":4591,"state":"open","locked":false,"title":"PR for issue #4571 \"quoting of SQL values\"","user":{"login":"konstantinTarletski","id":10614633,"avatar_url":"https://avatars.githubusercontent.com/u/10614633?v=3","gravatar_id":"","url":"https://api.github.com/users/konstantinTarletski","html_url":"https://github.com/konstantinTarletski","followers_url":"https://api.github.com/users/konstantinTarletski/followers","following_url":"https://api.github.com/users/konstantinTarletski/following{/other_user}","gists_url":"https://api.github.com/users/konstantinTarletski/gists{/gist_id}","starred_url":"https://api.github.com/users/konstantinTarletski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/konstantinTarletski/subscriptions","organizations_url":"https://api.github.com/users/konstantinTarletski/orgs","repos_url":"https://api.github.com/users/konstantinTarletski/repos","events_url":"https://api.github.com/users/konstantinTarletski/events{/privacy}","received_events_url":"https://api.github.com/users/konstantinTarletski/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-03T08:49:35Z","updated_at":"2016-08-03T17:18:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"523936e81b9c4aba50132e26f779fcde2774aa9e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/twosigma/beaker-notebook/pulls/4591/commits","review_comments_url":"https://api.github.com/repos/twosigma/beaker-notebook/pulls/4591/comments","review_comment_url":"https://api.github.com/repos/twosigma/beaker-notebook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twosigma/beaker-notebook/issues/4591/comments","statuses_url":"https://api.github.com/repos/twosigma/beaker-notebook/statuses/bb1edbf8c66b097c661e46bc6be42e28b744ffd6","head":{"label":"twosigma:kostja/4571","ref":"kostja/4571","sha":"bb1edbf8c66b097c661e46bc6be42e28b744ffd6","user":{"login":"twosigma","id":4049181,"avatar_url":"https://avatars.githubusercontent.com/u/4049181?v=3","gravatar_id":"","url":"https://api.github.com/users/twosigma","html_url":"https://github.com/twosigma","followers_url":"https://api.github.com/users/twosigma/followers","following_url":"https://api.github.com/users/twosigma/following{/other_user}","gists_url":"https://api.github.com/users/twosigma/gists{/gist_id}","starred_url":"https://api.github.com/users/twosigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twosigma/subscriptions","organizations_url":"https://api.github.com/users/twosigma/orgs","repos_url":"https://api.github.com/users/twosigma/repos","events_url":"https://api.github.com/users/twosigma/events{/privacy}","received_events_url":"https://api.github.com/users/twosigma/received_events","type":"Organization","site_admin":false},"repo":{"id":14895592,"name":"beaker-notebook","full_name":"twosigma/beaker-notebook","owner":{"login":"twosigma","id":4049181,"avatar_url":"https://avatars.githubusercontent.com/u/4049181?v=3","gravatar_id":"","url":"https://api.github.com/users/twosigma","html_url":"https://github.com/twosigma","followers_url":"https://api.github.com/users/twosigma/followers","following_url":"https://api.github.com/users/twosigma/following{/other_user}","gists_url":"https://api.github.com/users/twosigma/gists{/gist_id}","starred_url":"https://api.github.com/users/twosigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twosigma/subscriptions","organizations_url":"https://api.github.com/users/twosigma/orgs","repos_url":"https://api.github.com/users/twosigma/repos","events_url":"https://api.github.com/users/twosigma/events{/privacy}","received_events_url":"https://api.github.com/users/twosigma/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twosigma/beaker-notebook","description":"Web-based, polyglot research platform.","fork":false,"url":"https://api.github.com/repos/twosigma/beaker-notebook","forks_url":"https://api.github.com/repos/twosigma/beaker-notebook/forks","keys_url":"https://api.github.com/repos/twosigma/beaker-notebook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twosigma/beaker-notebook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twosigma/beaker-notebook/teams","hooks_url":"https://api.github.com/repos/twosigma/beaker-notebook/hooks","issue_events_url":"https://api.github.com/repos/twosigma/beaker-notebook/issues/events{/number}","events_url":"https://api.github.com/repos/twosigma/beaker-notebook/events","assignees_url":"https://api.github.com/repos/twosigma/beaker-notebook/assignees{/user}","branches_url":"https://api.github.com/repos/twosigma/beaker-notebook/branches{/branch}","tags_url":"https://api.github.com/repos/twosigma/beaker-notebook/tags","blobs_url":"https://api.github.com/repos/twosigma/beaker-notebook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twosigma/beaker-notebook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twosigma/beaker-notebook/git/refs{/sha}","trees_url":"https://api.github.com/repos/twosigma/beaker-notebook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twosigma/beaker-notebook/statuses/{sha}","languages_url":"https://api.github.com/repos/twosigma/beaker-notebook/languages","stargazers_url":"https://api.github.com/repos/twosigma/beaker-notebook/stargazers","contributors_url":"https://api.github.com/repos/twosigma/beaker-notebook/contributors","subscribers_url":"https://api.github.com/repos/twosigma/beaker-notebook/subscribers","subscription_url":"https://api.github.com/repos/twosigma/beaker-notebook/subscription","commits_url":"https://api.github.com/repos/twosigma/beaker-notebook/commits{/sha}","git_commits_url":"https://api.github.com/repos/twosigma/beaker-notebook/git/commits{/sha}","comments_url":"https://api.github.com/repos/twosigma/beaker-notebook/comments{/number}","issue_comment_url":"https://api.github.com/repos/twosigma/beaker-notebook/issues/comments{/number}","contents_url":"https://api.github.com/repos/twosigma/beaker-notebook/contents/{+path}","compare_url":"https://api.github.com/repos/twosigma/beaker-notebook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twosigma/beaker-notebook/merges","archive_url":"https://api.github.com/repos/twosigma/beaker-notebook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twosigma/beaker-notebook/downloads","issues_url":"https://api.github.com/repos/twosigma/beaker-notebook/issues{/number}","pulls_url":"https://api.github.com/repos/twosigma/beaker-notebook/pulls{/number}","milestones_url":"https://api.github.com/repos/twosigma/beaker-notebook/milestones{/number}","notifications_url":"https://api.github.com/repos/twosigma/beaker-notebook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twosigma/beaker-notebook/labels{/name}","releases_url":"https://api.github.com/repos/twosigma/beaker-notebook/releases{/id}","deployments_url":"https://api.github.com/repos/twosigma/beaker-notebook/deployments","created_at":"2013-12-03T14:16:36Z","updated_at":"2016-07-30T21:59:47Z","pushed_at":"2016-08-03T14:24:12Z","git_url":"git://github.com/twosigma/beaker-notebook.git","ssh_url":"git@github.com:twosigma/beaker-notebook.git","clone_url":"https://github.com/twosigma/beaker-notebook.git","svn_url":"https://github.com/twosigma/beaker-notebook","homepage":"http://BeakerNotebook.com","size":360564,"stargazers_count":969,"watchers_count":969,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":132,"mirror_url":null,"open_issues_count":428,"forks":132,"open_issues":428,"watchers":969,"default_branch":"master"}},"base":{"label":"twosigma:master","ref":"master","sha":"a4dc280db49b58ae78cb0f181b592715a758a72a","user":{"login":"twosigma","id":4049181,"avatar_url":"https://avatars.githubusercontent.com/u/4049181?v=3","gravatar_id":"","url":"https://api.github.com/users/twosigma","html_url":"https://github.com/twosigma","followers_url":"https://api.github.com/users/twosigma/followers","following_url":"https://api.github.com/users/twosigma/following{/other_user}","gists_url":"https://api.github.com/users/twosigma/gists{/gist_id}","starred_url":"https://api.github.com/users/twosigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twosigma/subscriptions","organizations_url":"https://api.github.com/users/twosigma/orgs","repos_url":"https://api.github.com/users/twosigma/repos","events_url":"https://api.github.com/users/twosigma/events{/privacy}","received_events_url":"https://api.github.com/users/twosigma/received_events","type":"Organization","site_admin":false},"repo":{"id":14895592,"name":"beaker-notebook","full_name":"twosigma/beaker-notebook","owner":{"login":"twosigma","id":4049181,"avatar_url":"https://avatars.githubusercontent.com/u/4049181?v=3","gravatar_id":"","url":"https://api.github.com/users/twosigma","html_url":"https://github.com/twosigma","followers_url":"https://api.github.com/users/twosigma/followers","following_url":"https://api.github.com/users/twosigma/following{/other_user}","gists_url":"https://api.github.com/users/twosigma/gists{/gist_id}","starred_url":"https://api.github.com/users/twosigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twosigma/subscriptions","organizations_url":"https://api.github.com/users/twosigma/orgs","repos_url":"https://api.github.com/users/twosigma/repos","events_url":"https://api.github.com/users/twosigma/events{/privacy}","received_events_url":"https://api.github.com/users/twosigma/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twosigma/beaker-notebook","description":"Web-based, polyglot research platform.","fork":false,"url":"https://api.github.com/repos/twosigma/beaker-notebook","forks_url":"https://api.github.com/repos/twosigma/beaker-notebook/forks","keys_url":"https://api.github.com/repos/twosigma/beaker-notebook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twosigma/beaker-notebook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twosigma/beaker-notebook/teams","hooks_url":"https://api.github.com/repos/twosigma/beaker-notebook/hooks","issue_events_url":"https://api.github.com/repos/twosigma/beaker-notebook/issues/events{/number}","events_url":"https://api.github.com/repos/twosigma/beaker-notebook/events","assignees_url":"https://api.github.com/repos/twosigma/beaker-notebook/assignees{/user}","branches_url":"https://api.github.com/repos/twosigma/beaker-notebook/branches{/branch}","tags_url":"https://api.github.com/repos/twosigma/beaker-notebook/tags","blobs_url":"https://api.github.com/repos/twosigma/beaker-notebook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twosigma/beaker-notebook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twosigma/beaker-notebook/git/refs{/sha}","trees_url":"https://api.github.com/repos/twosigma/beaker-notebook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twosigma/beaker-notebook/statuses/{sha}","languages_url":"https://api.github.com/repos/twosigma/beaker-notebook/languages","stargazers_url":"https://api.github.com/repos/twosigma/beaker-notebook/stargazers","contributors_url":"https://api.github.com/repos/twosigma/beaker-notebook/contributors","subscribers_url":"https://api.github.com/repos/twosigma/beaker-notebook/subscribers","subscription_url":"https://api.github.com/repos/twosigma/beaker-notebook/subscription","commits_url":"https://api.github.com/repos/twosigma/beaker-notebook/commits{/sha}","git_commits_url":"https://api.github.com/repos/twosigma/beaker-notebook/git/commits{/sha}","comments_url":"https://api.github.com/repos/twosigma/beaker-notebook/comments{/number}","issue_comment_url":"https://api.github.com/repos/twosigma/beaker-notebook/issues/comments{/number}","contents_url":"https://api.github.com/repos/twosigma/beaker-notebook/contents/{+path}","compare_url":"https://api.github.com/repos/twosigma/beaker-notebook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twosigma/beaker-notebook/merges","archive_url":"https://api.github.com/repos/twosigma/beaker-notebook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twosigma/beaker-notebook/downloads","issues_url":"https://api.github.com/repos/twosigma/beaker-notebook/issues{/number}","pulls_url":"https://api.github.com/repos/twosigma/beaker-notebook/pulls{/number}","milestones_url":"https://api.github.com/repos/twosigma/beaker-notebook/milestones{/number}","notifications_url":"https://api.github.com/repos/twosigma/beaker-notebook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twosigma/beaker-notebook/labels{/name}","releases_url":"https://api.github.com/repos/twosigma/beaker-notebook/releases{/id}","deployments_url":"https://api.github.com/repos/twosigma/beaker-notebook/deployments","created_at":"2013-12-03T14:16:36Z","updated_at":"2016-07-30T21:59:47Z","pushed_at":"2016-08-03T14:24:12Z","git_url":"git://github.com/twosigma/beaker-notebook.git","ssh_url":"git@github.com:twosigma/beaker-notebook.git","clone_url":"https://github.com/twosigma/beaker-notebook.git","svn_url":"https://github.com/twosigma/beaker-notebook","homepage":"http://BeakerNotebook.com","size":360564,"stargazers_count":969,"watchers_count":969,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":132,"mirror_url":null,"open_issues_count":428,"forks":132,"open_issues":428,"watchers":969,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twosigma/beaker-notebook/pulls/4591"},"html":{"href":"https://github.com/twosigma/beaker-notebook/pull/4591"},"issue":{"href":"https://api.github.com/repos/twosigma/beaker-notebook/issues/4591"},"comments":{"href":"https://api.github.com/repos/twosigma/beaker-notebook/issues/4591/comments"},"review_comments":{"href":"https://api.github.com/repos/twosigma/beaker-notebook/pulls/4591/comments"},"review_comment":{"href":"https://api.github.com/repos/twosigma/beaker-notebook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twosigma/beaker-notebook/pulls/4591/commits"},"statuses":{"href":"https://api.github.com/repos/twosigma/beaker-notebook/statuses/bb1edbf8c66b097c661e46bc6be42e28b744ffd6"}}}}
{"actor":{"display_login":"konstantinTarletski"}}