Interface DatabaseAPI.Update
- All Superinterfaces:
AutoCloseable
,DatabaseAPI.StatementCommon
- Enclosing interface:
- DatabaseAPI
public static interface DatabaseAPI.Update extends DatabaseAPI.StatementCommon
Wrapping a prepared update to be more suitable for Java 8 onwards. This
supports prepared statements that do not yield result sets, but may (in
some circumstances) generate IDs.
Note that, as a security measure, most database connectors do not support putting multiple statements in a single prepared statement.
- Author:
- Donal Fellows
-
Method Summary
Methods inherited from interface uk.ac.manchester.spinnaker.alloc.db.DatabaseAPI.StatementCommon
close, getParameters
-
Method Details
-
call
Run the update on the given arguments.- Parameters:
arguments
- Positional argument to the query- Returns:
- The number of rows updated
-
key
Run the update on the given arguments. This is expected to generate a single integer primary key (common withINSERT
).- Parameters:
arguments
- Positional arguments to the query- Returns:
- The integer primary key generated by the update.
- See Also:
GeneratesID
-