@@ -0,0 +1,1533 @@
+package org.jdbchub.jdbc;%0A%0Aimport org.junit.Test;%0Aimport org.skife.jdbi.v2.DBI;%0Aimport org.skife.jdbi.v2.Handle;%0Aimport org.skife.jdbi.v2.Query;%0Aimport org.skife.jdbi.v2.util.StringMapper;%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.StringReader;%0Aimport java.sql.PreparedStatement;%0Aimport static java.util.Arrays.asList;%0Aimport static org.jdbchub.JdbcHubTestUtils.createTestConnection;%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class JdbcPreparedStatementTest %7B%0A%0A%09@Test%0A%09public void testExecuteUpdate() throws Exception %7B%0A%09%09try (JdbcConnection c = createTestConnection()) %7B%0A%09%09%09PreparedStatement st = c.prepareStatement(%22update test_items set value = ? where name like ?%22);%0A%09%09%09st.setString(1, %22nv1%22);%0A%09%09%09st.setString(2, %22%251%22);%0A%09%09%09assertEquals(3, st.executeUpdate());%0A%09%09%09st.setString(2, %22%252_%22);%0A%09%09%09assertEquals(2, st.executeUpdate());%0A%09%09%7D%0A%09%7D%0A%0A%09@Test%0A%09public void testSetStream() throws Exception %7B%0A%09%09try (JdbcConnection c = createTestConnection()) %7B%0A%09%09%09Handle h = DBI.open(c);%0A%09%09%09PreparedStatement st = c.prepareStatement(%22update test_items set value = ? where name like '%251'%22);%0A%09%09%09st.setAsciiStream(1, new ByteArrayInputStream(%22nv1%22.getBytes()));%0A%09%09%09assertEquals(3, st.executeUpdate());%0A%09%09%09Query%3CString%3E q = h.createQuery(%22select value from test_items where name like '%251'%22).map(StringMapper.FIRST);%0A%09%09%09assertEquals(asList(%22nv1%22, %22nv1%22, %22nv1%22), q.list());%0A%09%09%09st.setCharacterStream(1, new StringReader(%22nv2%22));%0A%09%09%09assertEquals(3, st.executeUpdate());%0A%09%09%09assertEquals(asList(%22nv2%22, %22nv2%22, %22nv2%22), q.list());%0A%09%09%7D%0A%09%7D%0A%0A%7D

add JdbcPreparedStatementTest