public class UpdateStatementDefault extends StatementBase implements UpdateStatement
| Constructor and Description |
|---|
UpdateStatementDefault(Connection connection) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
createUniqueParamName() |
protected PreparedStatement |
getStatementWithParamsAdded(Connection connection) |
void |
setCase(String paramName,
String columnNameToCheck,
Map<?,?> map)
Adds a
CASE statement, using the key and values
of the given map. |
int |
update()
Execute the update and return the number
of affected rows.
|
<T> List<T> |
update(ResultSetHandler<T> resultSetHandler)
Execute the update and return a result set.
|
addCurrentParamsToStatement, addParam, addParamsToStatement, clearParams, clearSql, clearSql, close, close, copyParamsAndStaticTokensTo, getConnection, getIndexMap, getOriginalQuery, getParams, getParsedQuery, getQueryBuilder, getSql, getSqlFormmatter, getStaticTokens, parse, setBoolean, setDate, setDouble, setFloat, setInInteger, setInLong, setInstant, setInString, setInStringFromEnumNames, setInStringFromEnumNames, setInteger, setLong, setLongList, setParams, setStaticTokens, setString, sql, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclearSql, clearSql, getSql, setBoolean, setDate, setDouble, setFloat, setInInteger, setInLong, setInstant, setInString, setInStringFromEnumNames, setInStringFromEnumNames, setInteger, setLong, setLongList, setString, sqlpublic UpdateStatementDefault(Connection connection)
protected PreparedStatement getStatementWithParamsAdded(Connection connection)
public int update()
UpdateStatementupdate in interface UpdateStatementpublic <T> List<T> update(ResultSetHandler<T> resultSetHandler)
UpdateStatement
This can be used with a RETURNING clause.
update in interface UpdateStatementpublic void setCase(String paramName, String columnNameToCheck, Map<?,?> map)
UpdateStatementCASE statement, using the key and values
of the given map.
For example :
CASE
WHEN mapKey1 = 1 then mapVal1
WHEN mapKey2 = 2 then mapVal2
END
setCase in interface UpdateStatementprotected String createUniqueParamName()
Copyright © 2019. All rights reserved.