{"action":"created","comment":{"url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/pulls/comments/91170776","pull_request_review_id":11678649,"id":91170776,"diff_hunk":"@@ -0,0 +1,42 @@\n+package ru.aviaj.database.executor;\n+\n+import ru.aviaj.database.handler.IResultHandler;\n+\n+import java.sql.Connection;\n+import java.sql.ResultSet;\n+import java.sql.SQLException;\n+import java.sql.Statement;\n+\n+@SuppressWarnings({\"JDBCResourceOpenedButNotSafelyClosed\", \"ThrowInsideCatchBlockWhichIgnoresCaughtException\", \"DuplicateThrows\"})\n+public class Executor {\n+\n+    public <T> T execQuery(Connection dbConnection, String sqlQuery, IResultHandler<T> resultHandler)\n+            throws SQLException {\n+\n+        try (Statement statement = dbConnection.createStatement()) {\n+\n+            final boolean execResult = statement.execute(sqlQuery);\n+            if (!execResult)\n+                return null;\n+\n+            try(ResultSet resultSet = statement.getResultSet()) {\n+                final T result = resultHandler.handle(resultSet);\n+                resultSet.close();\n+                statement.close();\n+\n+                return result;\n+            }\n+        }\n+    }\n+\n+    public int execUpdate(Connection dbConnection, String sqlUpdate)\n+            throws SQLException {\n+\n+        try (Statement statement = dbConnection.createStatement()) {\n+            final int result = statement.executeUpdate(sqlUpdate);\n+            statement.close();","path":"src/main/java/ru/aviaj/database/executor/Executor.java","position":37,"original_position":37,"commit_id":"fe89df5d2ef4d96f36c4e438866272b6eefa2631","original_commit_id":"fe89df5d2ef4d96f36c4e438866272b6eefa2631","user":{"login":"KSolovyev","id":4122313,"avatar_url":"https://avatars.githubusercontent.com/u/4122313?v=3","gravatar_id":"","url":"https://api.github.com/users/KSolovyev","html_url":"https://github.com/KSolovyev","followers_url":"https://api.github.com/users/KSolovyev/followers","following_url":"https://api.github.com/users/KSolovyev/following{/other_user}","gists_url":"https://api.github.com/users/KSolovyev/gists{/gist_id}","starred_url":"https://api.github.com/users/KSolovyev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KSolovyev/subscriptions","organizations_url":"https://api.github.com/users/KSolovyev/orgs","repos_url":"https://api.github.com/users/KSolovyev/repos","events_url":"https://api.github.com/users/KSolovyev/events{/privacy}","received_events_url":"https://api.github.com/users/KSolovyev/received_events","type":"User","site_admin":false},"body":"и здесь тоже","created_at":"2016-12-06T21:05:45Z","updated_at":"2016-12-06T21:06:21Z","html_url":"https://github.com/java-park-mail-ru/aviaj-09-2016/pull/2#discussion_r91170776","pull_request_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/pulls/comments/91170776"},"html":{"href":"https://github.com/java-park-mail-ru/aviaj-09-2016/pull/2#discussion_r91170776"},"pull_request":{"href":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/pulls/2","id":93841350,"html_url":"https://github.com/java-park-mail-ru/aviaj-09-2016/pull/2","diff_url":"https://github.com/java-park-mail-ru/aviaj-09-2016/pull/2.diff","patch_url":"https://github.com/java-park-mail-ru/aviaj-09-2016/pull/2.patch","issue_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/issues/2","number":2,"state":"open","locked":false,"title":"Команда AviaJ, РК№2","user":{"login":"TimeEscaper","id":10324030,"avatar_url":"https://avatars.githubusercontent.com/u/10324030?v=3","gravatar_id":"","url":"https://api.github.com/users/TimeEscaper","html_url":"https://github.com/TimeEscaper","followers_url":"https://api.github.com/users/TimeEscaper/followers","following_url":"https://api.github.com/users/TimeEscaper/following{/other_user}","gists_url":"https://api.github.com/users/TimeEscaper/gists{/gist_id}","starred_url":"https://api.github.com/users/TimeEscaper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimeEscaper/subscriptions","organizations_url":"https://api.github.com/users/TimeEscaper/orgs","repos_url":"https://api.github.com/users/TimeEscaper/repos","events_url":"https://api.github.com/users/TimeEscaper/events{/privacy}","received_events_url":"https://api.github.com/users/TimeEscaper/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-15T20:25:11Z","updated_at":"2016-12-06T21:06:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fdbcbf7941dccf7e8c2a0f6bbaec95f216c9a6da","assignee":{"login":"KSolovyev","id":4122313,"avatar_url":"https://avatars.githubusercontent.com/u/4122313?v=3","gravatar_id":"","url":"https://api.github.com/users/KSolovyev","html_url":"https://github.com/KSolovyev","followers_url":"https://api.github.com/users/KSolovyev/followers","following_url":"https://api.github.com/users/KSolovyev/following{/other_user}","gists_url":"https://api.github.com/users/KSolovyev/gists{/gist_id}","starred_url":"https://api.github.com/users/KSolovyev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KSolovyev/subscriptions","organizations_url":"https://api.github.com/users/KSolovyev/orgs","repos_url":"https://api.github.com/users/KSolovyev/repos","events_url":"https://api.github.com/users/KSolovyev/events{/privacy}","received_events_url":"https://api.github.com/users/KSolovyev/received_events","type":"User","site_admin":false},"assignees":[{"login":"KSolovyev","id":4122313,"avatar_url":"https://avatars.githubusercontent.com/u/4122313?v=3","gravatar_id":"","url":"https://api.github.com/users/KSolovyev","html_url":"https://github.com/KSolovyev","followers_url":"https://api.github.com/users/KSolovyev/followers","following_url":"https://api.github.com/users/KSolovyev/following{/other_user}","gists_url":"https://api.github.com/users/KSolovyev/gists{/gist_id}","starred_url":"https://api.github.com/users/KSolovyev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KSolovyev/subscriptions","organizations_url":"https://api.github.com/users/KSolovyev/orgs","repos_url":"https://api.github.com/users/KSolovyev/repos","events_url":"https://api.github.com/users/KSolovyev/events{/privacy}","received_events_url":"https://api.github.com/users/KSolovyev/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/pulls/2/commits","review_comments_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/pulls/2/comments","review_comment_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/pulls/comments{/number}","comments_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/issues/2/comments","statuses_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/statuses/fe89df5d2ef4d96f36c4e438866272b6eefa2631","head":{"label":"TimeEscaper:master","ref":"master","sha":"fe89df5d2ef4d96f36c4e438866272b6eefa2631","user":{"login":"TimeEscaper","id":10324030,"avatar_url":"https://avatars.githubusercontent.com/u/10324030?v=3","gravatar_id":"","url":"https://api.github.com/users/TimeEscaper","html_url":"https://github.com/TimeEscaper","followers_url":"https://api.github.com/users/TimeEscaper/followers","following_url":"https://api.github.com/users/TimeEscaper/following{/other_user}","gists_url":"https://api.github.com/users/TimeEscaper/gists{/gist_id}","starred_url":"https://api.github.com/users/TimeEscaper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimeEscaper/subscriptions","organizations_url":"https://api.github.com/users/TimeEscaper/orgs","repos_url":"https://api.github.com/users/TimeEscaper/repos","events_url":"https://api.github.com/users/TimeEscaper/events{/privacy}","received_events_url":"https://api.github.com/users/TimeEscaper/received_events","type":"User","site_admin":false},"repo":{"id":68029291,"name":"aviaj-09-2016","full_name":"TimeEscaper/aviaj-09-2016","owner":{"login":"TimeEscaper","id":10324030,"avatar_url":"https://avatars.githubusercontent.com/u/10324030?v=3","gravatar_id":"","url":"https://api.github.com/users/TimeEscaper","html_url":"https://github.com/TimeEscaper","followers_url":"https://api.github.com/users/TimeEscaper/followers","following_url":"https://api.github.com/users/TimeEscaper/following{/other_user}","gists_url":"https://api.github.com/users/TimeEscaper/gists{/gist_id}","starred_url":"https://api.github.com/users/TimeEscaper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimeEscaper/subscriptions","organizations_url":"https://api.github.com/users/TimeEscaper/orgs","repos_url":"https://api.github.com/users/TimeEscaper/repos","events_url":"https://api.github.com/users/TimeEscaper/events{/privacy}","received_events_url":"https://api.github.com/users/TimeEscaper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TimeEscaper/aviaj-09-2016","description":null,"fork":true,"url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016","forks_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/forks","keys_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/teams","hooks_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/hooks","issue_events_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/issues/events{/number}","events_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/events","assignees_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/assignees{/user}","branches_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/branches{/branch}","tags_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/tags","blobs_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/statuses/{sha}","languages_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/languages","stargazers_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/stargazers","contributors_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/contributors","subscribers_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/subscribers","subscription_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/subscription","commits_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/contents/{+path}","compare_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/merges","archive_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/downloads","issues_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/issues{/number}","pulls_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/pulls{/number}","milestones_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/milestones{/number}","notifications_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/labels{/name}","releases_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/releases{/id}","deployments_url":"https://api.github.com/repos/TimeEscaper/aviaj-09-2016/deployments","created_at":"2016-09-12T16:59:49Z","updated_at":"2016-10-04T17:13:00Z","pushed_at":"2016-12-02T17:22:43Z","git_url":"git://github.com/TimeEscaper/aviaj-09-2016.git","ssh_url":"git@github.com:TimeEscaper/aviaj-09-2016.git","clone_url":"https://github.com/TimeEscaper/aviaj-09-2016.git","svn_url":"https://github.com/TimeEscaper/aviaj-09-2016","homepage":null,"size":194,"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":"java-park-mail-ru:master","ref":"master","sha":"c6d3ee482fd6737a8be4351114a930c3cd868009","user":{"login":"java-park-mail-ru","id":17194939,"avatar_url":"https://avatars.githubusercontent.com/u/17194939?v=3","gravatar_id":"","url":"https://api.github.com/users/java-park-mail-ru","html_url":"https://github.com/java-park-mail-ru","followers_url":"https://api.github.com/users/java-park-mail-ru/followers","following_url":"https://api.github.com/users/java-park-mail-ru/following{/other_user}","gists_url":"https://api.github.com/users/java-park-mail-ru/gists{/gist_id}","starred_url":"https://api.github.com/users/java-park-mail-ru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/java-park-mail-ru/subscriptions","organizations_url":"https://api.github.com/users/java-park-mail-ru/orgs","repos_url":"https://api.github.com/users/java-park-mail-ru/repos","events_url":"https://api.github.com/users/java-park-mail-ru/events{/privacy}","received_events_url":"https://api.github.com/users/java-park-mail-ru/received_events","type":"Organization","site_admin":false},"repo":{"id":67992761,"name":"aviaj-09-2016","full_name":"java-park-mail-ru/aviaj-09-2016","owner":{"login":"java-park-mail-ru","id":17194939,"avatar_url":"https://avatars.githubusercontent.com/u/17194939?v=3","gravatar_id":"","url":"https://api.github.com/users/java-park-mail-ru","html_url":"https://github.com/java-park-mail-ru","followers_url":"https://api.github.com/users/java-park-mail-ru/followers","following_url":"https://api.github.com/users/java-park-mail-ru/following{/other_user}","gists_url":"https://api.github.com/users/java-park-mail-ru/gists{/gist_id}","starred_url":"https://api.github.com/users/java-park-mail-ru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/java-park-mail-ru/subscriptions","organizations_url":"https://api.github.com/users/java-park-mail-ru/orgs","repos_url":"https://api.github.com/users/java-park-mail-ru/repos","events_url":"https://api.github.com/users/java-park-mail-ru/events{/privacy}","received_events_url":"https://api.github.com/users/java-park-mail-ru/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/java-park-mail-ru/aviaj-09-2016","description":null,"fork":false,"url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016","forks_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/forks","keys_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/teams","hooks_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/hooks","issue_events_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/issues/events{/number}","events_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/events","assignees_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/assignees{/user}","branches_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/branches{/branch}","tags_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/tags","blobs_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/statuses/{sha}","languages_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/languages","stargazers_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/stargazers","contributors_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/contributors","subscribers_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/subscribers","subscription_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/subscription","commits_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/contents/{+path}","compare_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/merges","archive_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/downloads","issues_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/issues{/number}","pulls_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/pulls{/number}","milestones_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/milestones{/number}","notifications_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/labels{/name}","releases_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/releases{/id}","deployments_url":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/deployments","created_at":"2016-09-12T08:56:43Z","updated_at":"2016-10-14T21:15:48Z","pushed_at":"2016-12-02T15:50:15Z","git_url":"git://github.com/java-park-mail-ru/aviaj-09-2016.git","ssh_url":"git@github.com:java-park-mail-ru/aviaj-09-2016.git","clone_url":"https://github.com/java-park-mail-ru/aviaj-09-2016.git","svn_url":"https://github.com/java-park-mail-ru/aviaj-09-2016","homepage":null,"size":115,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/pulls/2"},"html":{"href":"https://github.com/java-park-mail-ru/aviaj-09-2016/pull/2"},"issue":{"href":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/issues/2"},"comments":{"href":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/java-park-mail-ru/aviaj-09-2016/statuses/fe89df5d2ef4d96f36c4e438866272b6eefa2631"}}}}
{"actor":{"display_login":"KSolovyev"}}