public final This bindList(BiConsumer<SqlStatement, String> onEmpty, String key, List<?> values) {
        if (values == null || values.isEmpty()) {
            onEmpty.accept(this, key);
            return typedThis;
        }

        StringBuilder names = new StringBuilder();

        for (int i = 0; i < values.size(); i++) {
            String name = "__" + key + "_" + i;

            if (i > 0) {
                names.append(',');
            }
            String paramName = getConfig().get(SqlStatements.class).getSqlParser().nameParameter(name, getContext());
            names.append(paramName);

            bind(name, values.get(i));
        }

        return define(key, names.toString());
    }
Bind a parameter for each value in the given list, and defines an attribute as the comma-separated list of
parameter references (using colon prefix).
<p>
Examples:
<pre>
List&lt;String&gt; columnNames = Arrays.asList("id", "name", "created_on");
List&lt;Object&gt; values = Arrays.asList(1, "Alice", LocalDate.now());
handle.createUpdate("insert into things (&lt;columnNames&gt;) values (&lt;values&gt;)")
    .defineList("columnNames", columnNames)
    .bindList("values", values)
    .execute();

List&lt;Integer&gt; ids = Arrays.asList(1, 2, 3);
List&lt;Thing&gt; things = handle.createQuery("select * from things where id in (&lt;ids&gt;)")
    .bindList("ids", ids)
    .mapTo(Contact.class)
    .list();
</pre>

Note that using this method modifies the SQL statement by using a defined attribute. This is
problematic when using {@link Handle#prepareBatch(String)} or the {@link PreparedBatch} SQL
operation as those evaluate the SQL statement only once. When binding lists of different size,
the number of placeholders will not match the number of elements in the list which will lead
to errors.

@param onEmpty handler for null/empty list
@param key     attribute name
@param values  list of values that will be comma-spliced into the defined attribute value.
@return this
@throws IllegalArgumentException if the list is empty.
@see EmptyHandling
core/src/main/java/org/jdbi/v3/core/statement/SqlStatement.java