JDBI query needs to support setting a value, or null, for multiple columns in the query.
But, the following is inserting empty strings and zeroes, not nulls:
handle
.createUpdate("REPLACE INTO products(id, name, price) VALUES (:id, :name, :price)")
.bind("id", product.getId())
.bind("name", product.getName())
.bind("price", product.getPrice())
.execute();
Further, when I SELECT records from the same database and use the following row mapper, this results in zeroes (for Double, though String seems to map null OK):
return Product.newBuilder()
.setId(rs.getString("id"))
.setName(rs.getString("name"))
.setPrice(rs.getDouble("price"))
.build();