{"action":"created","comment":{"url":"https://api.github.com/repos/jdbi/jdbi/pulls/comments/83934868","pull_request_review_id":4745563,"id":83934868,"diff_hunk":"@@ -26,15 +26,29 @@\n import java.lang.annotation.Target;\n import java.lang.reflect.Method;\n import java.lang.reflect.Parameter;\n+import java.util.Arrays;\n import java.util.List;\n \n /**\n- * Used to dynamically set {@link List} arguments as attributes on the StatementContext for the statement generated for\n- * this method.\n+ * Used to dynamically set {@link List} or array arguments as attributes on the StatementContext for the statement\n+ * generated for this method. For example:\n+ * <p>\n+ * {@code\n+ * @SqlUpdate(\"insert into <table> (<columns>) values (<values>)\")\n+ * int insert(@Define String table, @DefineIn List<String> columns, @BindIn(\"values\") List<Object> values);\n+ * }\n+ * <p>\n+ * {@code\n+ * @SqlQuery(\"select <columns> from <table> where id = :id\")\n+ * ResultSet select(@DefineIn(\"columns\") List<String> columns, @Define(\"table\") String table, @Bind(\"id\") long id);\n+ * }\n  * <p>\n  * A {@code List} argument passed to {@code @DefineIn} will be converted to a comma-separated String and set as a whole\n- * as a single specified attribute. Null members in the {@code List} are ignored, but duplicate members in the\n- * {@code List} may cause SQL exceptions. An empty {@code List} will result in an {@link IllegalArgumentException}.\n+ * as a single specified attribute. Duplicate members in the {@code List} may cause SQL exceptions. An empty\n+ * {@code List} or {@code null} members in the {@code List} will result in an {@link IllegalArgumentException}.\n+ * <p>\n+ * Be aware of the list members you're binding with @DefineIn, as there is no input sanitization! <b>Blindly passing\n+ * Strings through <code>@DefineIn</code> may make your application vulnerable to SQL Injection.</b>","path":"sqlobject/src/main/java/org/jdbi/v3/sqlobject/customizers/DefineIn.java","position":51,"original_position":30,"commit_id":"54f1d67181f0c18352b113882d4bb15668cdf239","original_commit_id":"54f1d67181f0c18352b113882d4bb15668cdf239","user":{"login":"qualidafial","id":38629,"avatar_url":"https://avatars.githubusercontent.com/u/38629?v=3","gravatar_id":"","url":"https://api.github.com/users/qualidafial","html_url":"https://github.com/qualidafial","followers_url":"https://api.github.com/users/qualidafial/followers","following_url":"https://api.github.com/users/qualidafial/following{/other_user}","gists_url":"https://api.github.com/users/qualidafial/gists{/gist_id}","starred_url":"https://api.github.com/users/qualidafial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qualidafial/subscriptions","organizations_url":"https://api.github.com/users/qualidafial/orgs","repos_url":"https://api.github.com/users/qualidafial/repos","events_url":"https://api.github.com/users/qualidafial/events{/privacy}","received_events_url":"https://api.github.com/users/qualidafial/received_events","type":"User","site_admin":false},"body":"👍 ","created_at":"2016-10-18T19:44:25Z","updated_at":"2016-10-18T19:44:25Z","html_url":"https://github.com/jdbi/jdbi/pull/528#discussion_r83934868","pull_request_url":"https://api.github.com/repos/jdbi/jdbi/pulls/528","_links":{"self":{"href":"https://api.github.com/repos/jdbi/jdbi/pulls/comments/83934868"},"html":{"href":"https://github.com/jdbi/jdbi/pull/528#discussion_r83934868"},"pull_request":{"href":"https://api.github.com/repos/jdbi/jdbi/pulls/528"}}},"pull_request":{"url":"https://api.github.com/repos/jdbi/jdbi/pulls/528","id":89711962,"html_url":"https://github.com/jdbi/jdbi/pull/528","diff_url":"https://github.com/jdbi/jdbi/pull/528.diff","patch_url":"https://github.com/jdbi/jdbi/pull/528.patch","issue_url":"https://api.github.com/repos/jdbi/jdbi/issues/528","number":528,"state":"open","locked":false,"title":"New @DefineIn annotation for dynamic column list definition","user":{"login":"mdhausman","id":3947696,"avatar_url":"https://avatars.githubusercontent.com/u/3947696?v=3","gravatar_id":"","url":"https://api.github.com/users/mdhausman","html_url":"https://github.com/mdhausman","followers_url":"https://api.github.com/users/mdhausman/followers","following_url":"https://api.github.com/users/mdhausman/following{/other_user}","gists_url":"https://api.github.com/users/mdhausman/gists{/gist_id}","starred_url":"https://api.github.com/users/mdhausman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdhausman/subscriptions","organizations_url":"https://api.github.com/users/mdhausman/orgs","repos_url":"https://api.github.com/users/mdhausman/repos","events_url":"https://api.github.com/users/mdhausman/events{/privacy}","received_events_url":"https://api.github.com/users/mdhausman/received_events","type":"User","site_admin":false},"body":"Added DefineIn annotation to the jdbi repository, created TestDefineInParameter.java for unit testing it.\r\n\r\nThis is for issue #512.","created_at":"2016-10-17T22:01:26Z","updated_at":"2016-10-18T19:44:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"459770bd8d31adbdde21ad2a56049fcdd8fd0155","assignee":{"login":"qualidafial","id":38629,"avatar_url":"https://avatars.githubusercontent.com/u/38629?v=3","gravatar_id":"","url":"https://api.github.com/users/qualidafial","html_url":"https://github.com/qualidafial","followers_url":"https://api.github.com/users/qualidafial/followers","following_url":"https://api.github.com/users/qualidafial/following{/other_user}","gists_url":"https://api.github.com/users/qualidafial/gists{/gist_id}","starred_url":"https://api.github.com/users/qualidafial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qualidafial/subscriptions","organizations_url":"https://api.github.com/users/qualidafial/orgs","repos_url":"https://api.github.com/users/qualidafial/repos","events_url":"https://api.github.com/users/qualidafial/events{/privacy}","received_events_url":"https://api.github.com/users/qualidafial/received_events","type":"User","site_admin":false},"assignees":[{"login":"qualidafial","id":38629,"avatar_url":"https://avatars.githubusercontent.com/u/38629?v=3","gravatar_id":"","url":"https://api.github.com/users/qualidafial","html_url":"https://github.com/qualidafial","followers_url":"https://api.github.com/users/qualidafial/followers","following_url":"https://api.github.com/users/qualidafial/following{/other_user}","gists_url":"https://api.github.com/users/qualidafial/gists{/gist_id}","starred_url":"https://api.github.com/users/qualidafial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qualidafial/subscriptions","organizations_url":"https://api.github.com/users/qualidafial/orgs","repos_url":"https://api.github.com/users/qualidafial/repos","events_url":"https://api.github.com/users/qualidafial/events{/privacy}","received_events_url":"https://api.github.com/users/qualidafial/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/jdbi/jdbi/pulls/528/commits","review_comments_url":"https://api.github.com/repos/jdbi/jdbi/pulls/528/comments","review_comment_url":"https://api.github.com/repos/jdbi/jdbi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jdbi/jdbi/issues/528/comments","statuses_url":"https://api.github.com/repos/jdbi/jdbi/statuses/54f1d67181f0c18352b113882d4bb15668cdf239","head":{"label":"wayfair:define_in_annotation","ref":"define_in_annotation","sha":"54f1d67181f0c18352b113882d4bb15668cdf239","user":{"login":"wayfair","id":1065892,"avatar_url":"https://avatars.githubusercontent.com/u/1065892?v=3","gravatar_id":"","url":"https://api.github.com/users/wayfair","html_url":"https://github.com/wayfair","followers_url":"https://api.github.com/users/wayfair/followers","following_url":"https://api.github.com/users/wayfair/following{/other_user}","gists_url":"https://api.github.com/users/wayfair/gists{/gist_id}","starred_url":"https://api.github.com/users/wayfair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wayfair/subscriptions","organizations_url":"https://api.github.com/users/wayfair/orgs","repos_url":"https://api.github.com/users/wayfair/repos","events_url":"https://api.github.com/users/wayfair/events{/privacy}","received_events_url":"https://api.github.com/users/wayfair/received_events","type":"Organization","site_admin":false},"repo":{"id":70586316,"name":"jdbi","full_name":"wayfair/jdbi","owner":{"login":"wayfair","id":1065892,"avatar_url":"https://avatars.githubusercontent.com/u/1065892?v=3","gravatar_id":"","url":"https://api.github.com/users/wayfair","html_url":"https://github.com/wayfair","followers_url":"https://api.github.com/users/wayfair/followers","following_url":"https://api.github.com/users/wayfair/following{/other_user}","gists_url":"https://api.github.com/users/wayfair/gists{/gist_id}","starred_url":"https://api.github.com/users/wayfair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wayfair/subscriptions","organizations_url":"https://api.github.com/users/wayfair/orgs","repos_url":"https://api.github.com/users/wayfair/repos","events_url":"https://api.github.com/users/wayfair/events{/privacy}","received_events_url":"https://api.github.com/users/wayfair/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wayfair/jdbi","description":"jDBI is designed to provide convenient tabular data access in Java(tm). It uses the Java collections framework for query results, provides a convenient means of externalizing sql statements, and provides named parameter support for any database being used.","fork":true,"url":"https://api.github.com/repos/wayfair/jdbi","forks_url":"https://api.github.com/repos/wayfair/jdbi/forks","keys_url":"https://api.github.com/repos/wayfair/jdbi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wayfair/jdbi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wayfair/jdbi/teams","hooks_url":"https://api.github.com/repos/wayfair/jdbi/hooks","issue_events_url":"https://api.github.com/repos/wayfair/jdbi/issues/events{/number}","events_url":"https://api.github.com/repos/wayfair/jdbi/events","assignees_url":"https://api.github.com/repos/wayfair/jdbi/assignees{/user}","branches_url":"https://api.github.com/repos/wayfair/jdbi/branches{/branch}","tags_url":"https://api.github.com/repos/wayfair/jdbi/tags","blobs_url":"https://api.github.com/repos/wayfair/jdbi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wayfair/jdbi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wayfair/jdbi/git/refs{/sha}","trees_url":"https://api.github.com/repos/wayfair/jdbi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wayfair/jdbi/statuses/{sha}","languages_url":"https://api.github.com/repos/wayfair/jdbi/languages","stargazers_url":"https://api.github.com/repos/wayfair/jdbi/stargazers","contributors_url":"https://api.github.com/repos/wayfair/jdbi/contributors","subscribers_url":"https://api.github.com/repos/wayfair/jdbi/subscribers","subscription_url":"https://api.github.com/repos/wayfair/jdbi/subscription","commits_url":"https://api.github.com/repos/wayfair/jdbi/commits{/sha}","git_commits_url":"https://api.github.com/repos/wayfair/jdbi/git/commits{/sha}","comments_url":"https://api.github.com/repos/wayfair/jdbi/comments{/number}","issue_comment_url":"https://api.github.com/repos/wayfair/jdbi/issues/comments{/number}","contents_url":"https://api.github.com/repos/wayfair/jdbi/contents/{+path}","compare_url":"https://api.github.com/repos/wayfair/jdbi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wayfair/jdbi/merges","archive_url":"https://api.github.com/repos/wayfair/jdbi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wayfair/jdbi/downloads","issues_url":"https://api.github.com/repos/wayfair/jdbi/issues{/number}","pulls_url":"https://api.github.com/repos/wayfair/jdbi/pulls{/number}","milestones_url":"https://api.github.com/repos/wayfair/jdbi/milestones{/number}","notifications_url":"https://api.github.com/repos/wayfair/jdbi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wayfair/jdbi/labels{/name}","releases_url":"https://api.github.com/repos/wayfair/jdbi/releases{/id}","deployments_url":"https://api.github.com/repos/wayfair/jdbi/deployments","created_at":"2016-10-11T11:25:49Z","updated_at":"2016-10-11T11:25:51Z","pushed_at":"2016-10-18T19:15:24Z","git_url":"git://github.com/wayfair/jdbi.git","ssh_url":"git@github.com:wayfair/jdbi.git","clone_url":"https://github.com/wayfair/jdbi.git","svn_url":"https://github.com/wayfair/jdbi","homepage":"http://jdbi.org/","size":14559,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"jdbi:jdbi3","ref":"jdbi3","sha":"4055e434a879d03fb3fee255187dbe0df9bf2509","user":{"login":"jdbi","id":9668860,"avatar_url":"https://avatars.githubusercontent.com/u/9668860?v=3","gravatar_id":"","url":"https://api.github.com/users/jdbi","html_url":"https://github.com/jdbi","followers_url":"https://api.github.com/users/jdbi/followers","following_url":"https://api.github.com/users/jdbi/following{/other_user}","gists_url":"https://api.github.com/users/jdbi/gists{/gist_id}","starred_url":"https://api.github.com/users/jdbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdbi/subscriptions","organizations_url":"https://api.github.com/users/jdbi/orgs","repos_url":"https://api.github.com/users/jdbi/repos","events_url":"https://api.github.com/users/jdbi/events{/privacy}","received_events_url":"https://api.github.com/users/jdbi/received_events","type":"Organization","site_admin":false},"repo":{"id":229738,"name":"jdbi","full_name":"jdbi/jdbi","owner":{"login":"jdbi","id":9668860,"avatar_url":"https://avatars.githubusercontent.com/u/9668860?v=3","gravatar_id":"","url":"https://api.github.com/users/jdbi","html_url":"https://github.com/jdbi","followers_url":"https://api.github.com/users/jdbi/followers","following_url":"https://api.github.com/users/jdbi/following{/other_user}","gists_url":"https://api.github.com/users/jdbi/gists{/gist_id}","starred_url":"https://api.github.com/users/jdbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdbi/subscriptions","organizations_url":"https://api.github.com/users/jdbi/orgs","repos_url":"https://api.github.com/users/jdbi/repos","events_url":"https://api.github.com/users/jdbi/events{/privacy}","received_events_url":"https://api.github.com/users/jdbi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jdbi/jdbi","description":"jDBI is designed to provide convenient tabular data access in Java(tm). It uses the Java collections framework for query results, provides a convenient means of externalizing sql statements, and provides named parameter support for any database being used.","fork":false,"url":"https://api.github.com/repos/jdbi/jdbi","forks_url":"https://api.github.com/repos/jdbi/jdbi/forks","keys_url":"https://api.github.com/repos/jdbi/jdbi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jdbi/jdbi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jdbi/jdbi/teams","hooks_url":"https://api.github.com/repos/jdbi/jdbi/hooks","issue_events_url":"https://api.github.com/repos/jdbi/jdbi/issues/events{/number}","events_url":"https://api.github.com/repos/jdbi/jdbi/events","assignees_url":"https://api.github.com/repos/jdbi/jdbi/assignees{/user}","branches_url":"https://api.github.com/repos/jdbi/jdbi/branches{/branch}","tags_url":"https://api.github.com/repos/jdbi/jdbi/tags","blobs_url":"https://api.github.com/repos/jdbi/jdbi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jdbi/jdbi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jdbi/jdbi/git/refs{/sha}","trees_url":"https://api.github.com/repos/jdbi/jdbi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jdbi/jdbi/statuses/{sha}","languages_url":"https://api.github.com/repos/jdbi/jdbi/languages","stargazers_url":"https://api.github.com/repos/jdbi/jdbi/stargazers","contributors_url":"https://api.github.com/repos/jdbi/jdbi/contributors","subscribers_url":"https://api.github.com/repos/jdbi/jdbi/subscribers","subscription_url":"https://api.github.com/repos/jdbi/jdbi/subscription","commits_url":"https://api.github.com/repos/jdbi/jdbi/commits{/sha}","git_commits_url":"https://api.github.com/repos/jdbi/jdbi/git/commits{/sha}","comments_url":"https://api.github.com/repos/jdbi/jdbi/comments{/number}","issue_comment_url":"https://api.github.com/repos/jdbi/jdbi/issues/comments{/number}","contents_url":"https://api.github.com/repos/jdbi/jdbi/contents/{+path}","compare_url":"https://api.github.com/repos/jdbi/jdbi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jdbi/jdbi/merges","archive_url":"https://api.github.com/repos/jdbi/jdbi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jdbi/jdbi/downloads","issues_url":"https://api.github.com/repos/jdbi/jdbi/issues{/number}","pulls_url":"https://api.github.com/repos/jdbi/jdbi/pulls{/number}","milestones_url":"https://api.github.com/repos/jdbi/jdbi/milestones{/number}","notifications_url":"https://api.github.com/repos/jdbi/jdbi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jdbi/jdbi/labels{/name}","releases_url":"https://api.github.com/repos/jdbi/jdbi/releases{/id}","deployments_url":"https://api.github.com/repos/jdbi/jdbi/deployments","created_at":"2009-06-17T16:36:36Z","updated_at":"2016-10-16T06:18:46Z","pushed_at":"2016-10-18T19:15:25Z","git_url":"git://github.com/jdbi/jdbi.git","ssh_url":"git@github.com:jdbi/jdbi.git","clone_url":"https://github.com/jdbi/jdbi.git","svn_url":"https://github.com/jdbi/jdbi","homepage":"http://jdbi.org/","size":15567,"stargazers_count":709,"watchers_count":709,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":164,"mirror_url":null,"open_issues_count":66,"forks":164,"open_issues":66,"watchers":709,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jdbi/jdbi/pulls/528"},"html":{"href":"https://github.com/jdbi/jdbi/pull/528"},"issue":{"href":"https://api.github.com/repos/jdbi/jdbi/issues/528"},"comments":{"href":"https://api.github.com/repos/jdbi/jdbi/issues/528/comments"},"review_comments":{"href":"https://api.github.com/repos/jdbi/jdbi/pulls/528/comments"},"review_comment":{"href":"https://api.github.com/repos/jdbi/jdbi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jdbi/jdbi/pulls/528/commits"},"statuses":{"href":"https://api.github.com/repos/jdbi/jdbi/statuses/54f1d67181f0c18352b113882d4bb15668cdf239"}}}}
{"actor":{"display_login":"qualidafial"}}