Package org.jdbi.v3.core.statement
Class Update
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Configurable<Update>
Used for INSERT, UPDATE, and DELETE statements
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
int
execute()
Executes the statement, returning the update count.<R> R
execute
(ResultProducer<R> producer) Executes the update, returning the result obtained from the givenResultProducer
.executeAndReturnGeneratedKeys
(String... generatedKeyColumnNames) Execute the statement and returns any auto-generated keys.Returns the configuration registry associated with this object.final StatementContext
Returns the statement context associated with this statement.void
one()
Methods inherited from class org.jdbi.v3.core.statement.SqlStatement
bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bindArray, bindArray, bindArray, bindArray, bindArray, bindArray, bindArray, bindArray, bindASCIIStream, bindASCIIStream, bindBean, bindBean, bindBeanList, bindBinaryStream, bindBinaryStream, bindBySqlType, bindBySqlType, bindByType, bindByType, bindByType, bindByType, bindByType, bindByType, bindFields, bindFields, bindList, bindList, bindList, bindList, bindList, bindList, bindList, bindMap, bindMethods, bindMethods, bindMethodsList, bindNamedArgumentFinder, bindNull, bindNull, bindNVarchar, bindNVarchar, bindPojo, bindPojo, bindPojo, bindPojo, bindPojo, bindPojo, cleanupHandleCommit, cleanupHandleRollback, defineList, defineList, defineNamedBindings, setQueryTimeout, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jdbi.v3.core.config.Configurable
addCustomizer, configure, define, getConfig, registerArgument, registerArgument, registerArrayType, registerArrayType, registerArrayType, registerArrayType, registerCodecFactory, registerCollector, registerColumnMapper, registerColumnMapper, registerColumnMapper, registerColumnMapper, registerColumnMapper, registerColumnMapper, registerExtension, registerRowMapper, registerRowMapper, registerRowMapper, registerRowMapper, setMapKeyColumn, setMapValueColumn, setSqlArrayArgumentStrategy, setSqlLogger, setSqlParser, setTemplateEngine
-
Constructor Details
-
Update
-
Update
Deprecated delegate - please useCharSequence
signature for future compatibility.
-
-
Method Details
-
one
public void one() -
execute
public int execute()Executes the statement, returning the update count.- Returns:
- the number of rows modified
-
execute
Executes the update, returning the result obtained from the givenResultProducer
.- Type Parameters:
R
- the result type- Parameters:
producer
- the result producer.- Returns:
- value returned by the result producer.
-
executeAndReturnGeneratedKeys
Execute the statement and returns any auto-generated keys. This requires the JDBC driver to support theStatement.getGeneratedKeys()
method.- Parameters:
generatedKeyColumnNames
- optional list of generated key column names.- Returns:
- ResultBearing of generated keys
-
getHandle
-
getConfig
Description copied from interface:Configurable
Returns the configuration registry associated with this object.- Specified by:
getConfig
in interfaceConfigurable<This>
- Returns:
- the configuration registry associated with this object.
-
getContext
Returns the statement context associated with this statement.- Returns:
- the statement context associated with this statement.
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-