]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/database/GigiPreparedStatement.java
UPD: Forcing Update to be single-update or fail otherwise.
[gigi.git] / src / org / cacert / gigi / database / GigiPreparedStatement.java
index 81e5f4e31aa27004efb9df0468b1a2b31784b516..55ed6ad3d53d003ae6639c575dc19147a36cdfd0 100644 (file)
@@ -23,9 +23,12 @@ public class GigiPreparedStatement {
         }
     }
 
-    public int executeUpdate() {
+    public void executeUpdate() {
         try {
-            return target.executeUpdate();
+            int updated = target.executeUpdate();
+            if (updated != 1) {
+                throw new Error("FATAL: multiple or no data updated: " + updated);
+            }
         } catch (SQLException e) {
             handleSQL(e);
             throw new Error(e);