@@ -0,0 +1,1627 @@
+package org.sql2o;%0A%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.zapodot.junit.db.EmbeddedDatabaseRule;%0A%0Aimport java.util.List;%0A%0Aimport static org.hamcrest.CoreMatchers.equalTo;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.zapodot.junit.db.EmbeddedDatabaseRule.CompatibilityMode.Oracle;%0A%0A/**%0A * @author zapodot%0A */%0Apublic class QueryArrayTest %7B%0A%0A    private static class Foo %7B%0A        public int bar;%0A    %7D%0A    %0A    @Rule%0A    public EmbeddedDatabaseRule databaseRule = EmbeddedDatabaseRule.builder()%0A            .withMode(Oracle)%0A            .withInitialSql(%22CREATE TABLE FOO(BAR int PRIMARY KEY); INSERT INTO FOO VALUES(1); INSERT INTO FOO VALUES(2)%22)%0A            .build();%0A%0A    @Test%0A    public void arrayTest() throws Exception %7B%0A        final Sql2o database = new Sql2o(databaseRule.getDataSource());%0A        try(final Connection connection = database.open();%0A            final Query query = connection.createQuery(%22SELECT * FROM FOO WHERE BAR IN (:bars)%22)) %7B%0A            final List%3CFoo%3E foos = query.addParameter(%22bars%22, 1, 2).executeAndFetch(Foo.class);%0A            assertThat(foos.size(), equalTo(2));%0A%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void emptyArrayTest() throws Exception %7B%0A        final Sql2o database = new Sql2o(databaseRule.getDataSource());%0A%0A        try(final Connection connection = database.open();%0A            final Query query = connection.createQuery(%22SELECT * FROM FOO WHERE BAR IN (:bars)%22)) %7B%0A%0A            final List%3CFoo%3E noFoos = query.addParameter(%22bars%22, new Integer%5B%5D%7B%7D).executeAndFetch(Foo.class);%0A            assertThat(noFoos.size(), equalTo(0));%0A        %7D%0A    %7D%0A%7D

Test for issue #280