Beispiel #1
0
  public void testBinaryData() throws Exception {
    database.execute("create table foo(a blob)");
    PreparedStatement statement =
        database.openConnection().prepareStatement("insert into foo(a) values(?)");
    statement.setBytes(1, new byte[] {0, 1, 2, 127, 77, (byte) 200, (byte) 255, 0});
    statement.executeUpdate();

    assertEquals("INSERT INTO foo(a) VALUES(x'0001027f4dc8ff00');\n\n", dumpData());
  }