{"action":"created","comment":{"url":"https://api.github.com/repos/square/sqldelight/pulls/comments/245097534","pull_request_review_id":189137712,"id":245097534,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTA5NzUzNA==","diff_hunk":"@@ -25,12 +25,24 @@ interface SqlDatabase : Closeable {\n    *   If [identifier] is null, a fresh statement is required.\n    * [parameters] is the number of bindable parameters [sql] contains.\n    */\n-  fun prepareStatement(\n+  fun executeQuery(\n     identifier: Int?,\n-    sql: String,\n-    type: SqlPreparedStatement.Type,\n-    parameters: Int\n-  ): SqlPreparedStatement\n+    sql: () -> String,\n+    parameters: Int,\n+    binders: (SqlPreparedStatement.() -> Unit)? = null\n+  ): SqlCursor\n+\n+  /**\n+   * Executes the SQL statement in this [SqlPreparedStatement], which must be an\n+   * SQL Data Manipulation Language (DML) statement, such as `INSERT`, `UPDATE` or\n+   * `DELETE`; or an SQL statement that returns nothing, such as a DDL statement.\n+   */","path":"sqldelight-runtime/src/commonMain/kotlin/com/squareup/sqldelight/db/SqlDatabase.kt","position":20,"original_position":20,"commit_id":"c02407cbd658ffbc2c3f8104bc3193f1b556d9cc","original_commit_id":"c02407cbd658ffbc2c3f8104bc3193f1b556d9cc","user":{"login":"AlecStrong","id":1675456,"node_id":"MDQ6VXNlcjE2NzU0NTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1675456?v=4","gravatar_id":"","url":"https://api.github.com/users/AlecStrong","html_url":"https://github.com/AlecStrong","followers_url":"https://api.github.com/users/AlecStrong/followers","following_url":"https://api.github.com/users/AlecStrong/following{/other_user}","gists_url":"https://api.github.com/users/AlecStrong/gists{/gist_id}","starred_url":"https://api.github.com/users/AlecStrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlecStrong/subscriptions","organizations_url":"https://api.github.com/users/AlecStrong/orgs","repos_url":"https://api.github.com/users/AlecStrong/repos","events_url":"https://api.github.com/users/AlecStrong/events{/privacy}","received_events_url":"https://api.github.com/users/AlecStrong/received_events","type":"User","site_admin":false},"body":"javadocs need updating","created_at":"2019-01-03T18:54:46Z","updated_at":"2019-01-03T18:54:47Z","html_url":"https://github.com/square/sqldelight/pull/1126#discussion_r245097534","pull_request_url":"https://api.github.com/repos/square/sqldelight/pulls/1126","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/square/sqldelight/pulls/comments/245097534"},"html":{"href":"https://github.com/square/sqldelight/pull/1126#discussion_r245097534"},"pull_request":{"href":"https://api.github.com/repos/square/sqldelight/pulls/1126"}}},"pull_request":{"url":"https://api.github.com/repos/square/sqldelight/pulls/1126","id":242080284,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQyMDgwMjg0","html_url":"https://github.com/square/sqldelight/pull/1126","diff_url":"https://github.com/square/sqldelight/pull/1126.diff","patch_url":"https://github.com/square/sqldelight/pull/1126.patch","issue_url":"https://api.github.com/repos/square/sqldelight/issues/1126","number":1126,"state":"open","locked":false,"title":"Modify driver api to always execute sql","user":{"login":"AlecStrong","id":1675456,"node_id":"MDQ6VXNlcjE2NzU0NTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1675456?v=4","gravatar_id":"","url":"https://api.github.com/users/AlecStrong","html_url":"https://github.com/AlecStrong","followers_url":"https://api.github.com/users/AlecStrong/followers","following_url":"https://api.github.com/users/AlecStrong/following{/other_user}","gists_url":"https://api.github.com/users/AlecStrong/gists{/gist_id}","starred_url":"https://api.github.com/users/AlecStrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlecStrong/subscriptions","organizations_url":"https://api.github.com/users/AlecStrong/orgs","repos_url":"https://api.github.com/users/AlecStrong/repos","events_url":"https://api.github.com/users/AlecStrong/events{/privacy}","received_events_url":"https://api.github.com/users/AlecStrong/received_events","type":"User","site_admin":false},"body":" - Binds are given a restricted place to run\r\n - Type no longer needed, apis either do nothing or return a cursor\r\n - SQL string is lazy, in case a cached statement can be reused\r\n\r\nTheres a lot of generated code changes because of this. The only files that should need review are under integration-test: `PlayerQueries` and `QueryWrapper`. Other test changes will be the same.\r\n\r\nThe other important file to review is `SqlDatabase` as `prepareStatement`'s signature has been changed. \r\n\r\nDriver implementations can be reviewed but they're mostly mechanical, just moving around code to conform to the new `SqlDatabase` api. ","created_at":"2019-01-03T18:53:40Z","updated_at":"2019-01-03T18:54:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ccd5ce8a4e8ae8fe97e02fc85fc0e004f7a89fe6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/square/sqldelight/pulls/1126/commits","review_comments_url":"https://api.github.com/repos/square/sqldelight/pulls/1126/comments","review_comment_url":"https://api.github.com/repos/square/sqldelight/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/sqldelight/issues/1126/comments","statuses_url":"https://api.github.com/repos/square/sqldelight/statuses/c02407cbd658ffbc2c3f8104bc3193f1b556d9cc","head":{"label":"square:astrong/2019-01-03/always-execute-prepared-statement","ref":"astrong/2019-01-03/always-execute-prepared-statement","sha":"c02407cbd658ffbc2c3f8104bc3193f1b556d9cc","user":{"login":"square","id":82592,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyNTky","avatar_url":"https://avatars0.githubusercontent.com/u/82592?v=4","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":44677680,"node_id":"MDEwOlJlcG9zaXRvcnk0NDY3NzY4MA==","name":"sqldelight","full_name":"square/sqldelight","private":false,"owner":{"login":"square","id":82592,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyNTky","avatar_url":"https://avatars0.githubusercontent.com/u/82592?v=4","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/square/sqldelight","description":"Generates Java models from CREATE TABLE statements.","fork":false,"url":"https://api.github.com/repos/square/sqldelight","forks_url":"https://api.github.com/repos/square/sqldelight/forks","keys_url":"https://api.github.com/repos/square/sqldelight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/sqldelight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/sqldelight/teams","hooks_url":"https://api.github.com/repos/square/sqldelight/hooks","issue_events_url":"https://api.github.com/repos/square/sqldelight/issues/events{/number}","events_url":"https://api.github.com/repos/square/sqldelight/events","assignees_url":"https://api.github.com/repos/square/sqldelight/assignees{/user}","branches_url":"https://api.github.com/repos/square/sqldelight/branches{/branch}","tags_url":"https://api.github.com/repos/square/sqldelight/tags","blobs_url":"https://api.github.com/repos/square/sqldelight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/sqldelight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/sqldelight/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/sqldelight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/sqldelight/statuses/{sha}","languages_url":"https://api.github.com/repos/square/sqldelight/languages","stargazers_url":"https://api.github.com/repos/square/sqldelight/stargazers","contributors_url":"https://api.github.com/repos/square/sqldelight/contributors","subscribers_url":"https://api.github.com/repos/square/sqldelight/subscribers","subscription_url":"https://api.github.com/repos/square/sqldelight/subscription","commits_url":"https://api.github.com/repos/square/sqldelight/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/sqldelight/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/sqldelight/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/sqldelight/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/sqldelight/contents/{+path}","compare_url":"https://api.github.com/repos/square/sqldelight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/sqldelight/merges","archive_url":"https://api.github.com/repos/square/sqldelight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/sqldelight/downloads","issues_url":"https://api.github.com/repos/square/sqldelight/issues{/number}","pulls_url":"https://api.github.com/repos/square/sqldelight/pulls{/number}","milestones_url":"https://api.github.com/repos/square/sqldelight/milestones{/number}","notifications_url":"https://api.github.com/repos/square/sqldelight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/sqldelight/labels{/name}","releases_url":"https://api.github.com/repos/square/sqldelight/releases{/id}","deployments_url":"https://api.github.com/repos/square/sqldelight/deployments","created_at":"2015-10-21T13:21:18Z","updated_at":"2019-01-02T23:43:09Z","pushed_at":"2019-01-03T18:53:40Z","git_url":"git://github.com/square/sqldelight.git","ssh_url":"git@github.com:square/sqldelight.git","clone_url":"https://github.com/square/sqldelight.git","svn_url":"https://github.com/square/sqldelight","homepage":"","size":41551,"stargazers_count":1887,"watchers_count":1887,"language":"Kotlin","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":135,"mirror_url":null,"archived":false,"open_issues_count":50,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":135,"open_issues":50,"watchers":1887,"default_branch":"master"}},"base":{"label":"square:master","ref":"master","sha":"9822fd7a7fbdd93cb927568f9fda52478b0a3beb","user":{"login":"square","id":82592,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyNTky","avatar_url":"https://avatars0.githubusercontent.com/u/82592?v=4","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":44677680,"node_id":"MDEwOlJlcG9zaXRvcnk0NDY3NzY4MA==","name":"sqldelight","full_name":"square/sqldelight","private":false,"owner":{"login":"square","id":82592,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyNTky","avatar_url":"https://avatars0.githubusercontent.com/u/82592?v=4","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/square/sqldelight","description":"Generates Java models from CREATE TABLE statements.","fork":false,"url":"https://api.github.com/repos/square/sqldelight","forks_url":"https://api.github.com/repos/square/sqldelight/forks","keys_url":"https://api.github.com/repos/square/sqldelight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/sqldelight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/sqldelight/teams","hooks_url":"https://api.github.com/repos/square/sqldelight/hooks","issue_events_url":"https://api.github.com/repos/square/sqldelight/issues/events{/number}","events_url":"https://api.github.com/repos/square/sqldelight/events","assignees_url":"https://api.github.com/repos/square/sqldelight/assignees{/user}","branches_url":"https://api.github.com/repos/square/sqldelight/branches{/branch}","tags_url":"https://api.github.com/repos/square/sqldelight/tags","blobs_url":"https://api.github.com/repos/square/sqldelight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/sqldelight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/sqldelight/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/sqldelight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/sqldelight/statuses/{sha}","languages_url":"https://api.github.com/repos/square/sqldelight/languages","stargazers_url":"https://api.github.com/repos/square/sqldelight/stargazers","contributors_url":"https://api.github.com/repos/square/sqldelight/contributors","subscribers_url":"https://api.github.com/repos/square/sqldelight/subscribers","subscription_url":"https://api.github.com/repos/square/sqldelight/subscription","commits_url":"https://api.github.com/repos/square/sqldelight/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/sqldelight/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/sqldelight/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/sqldelight/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/sqldelight/contents/{+path}","compare_url":"https://api.github.com/repos/square/sqldelight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/sqldelight/merges","archive_url":"https://api.github.com/repos/square/sqldelight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/sqldelight/downloads","issues_url":"https://api.github.com/repos/square/sqldelight/issues{/number}","pulls_url":"https://api.github.com/repos/square/sqldelight/pulls{/number}","milestones_url":"https://api.github.com/repos/square/sqldelight/milestones{/number}","notifications_url":"https://api.github.com/repos/square/sqldelight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/sqldelight/labels{/name}","releases_url":"https://api.github.com/repos/square/sqldelight/releases{/id}","deployments_url":"https://api.github.com/repos/square/sqldelight/deployments","created_at":"2015-10-21T13:21:18Z","updated_at":"2019-01-02T23:43:09Z","pushed_at":"2019-01-03T18:53:40Z","git_url":"git://github.com/square/sqldelight.git","ssh_url":"git@github.com:square/sqldelight.git","clone_url":"https://github.com/square/sqldelight.git","svn_url":"https://github.com/square/sqldelight","homepage":"","size":41551,"stargazers_count":1887,"watchers_count":1887,"language":"Kotlin","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":135,"mirror_url":null,"archived":false,"open_issues_count":50,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":135,"open_issues":50,"watchers":1887,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/sqldelight/pulls/1126"},"html":{"href":"https://github.com/square/sqldelight/pull/1126"},"issue":{"href":"https://api.github.com/repos/square/sqldelight/issues/1126"},"comments":{"href":"https://api.github.com/repos/square/sqldelight/issues/1126/comments"},"review_comments":{"href":"https://api.github.com/repos/square/sqldelight/pulls/1126/comments"},"review_comment":{"href":"https://api.github.com/repos/square/sqldelight/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/sqldelight/pulls/1126/commits"},"statuses":{"href":"https://api.github.com/repos/square/sqldelight/statuses/c02407cbd658ffbc2c3f8104bc3193f1b556d9cc"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"AlecStrong"}}