public final class Insert extends AbstractQuery
INSERT query.| Constructor and Description |
|---|
Insert() |
| Modifier and Type | Method and Description |
|---|---|
List<Object> |
getParams() |
String |
getSQL() |
Insert |
ignore()
Adds an
IGNORE clause to the query. |
Insert |
onDuplicateKeyUpdateExcept(String... keys)
Adds
ON DUPLICATE KEY UPDATE clause with all values added using
value*() methods, exclusing colums marked as keys. |
Insert |
value(@NonNull String column,
@NonNull Object value)
Adds a value to be inserted for the specified column.
|
Insert |
valueExpr(@NonNull String column,
@NonNull String expr,
Object... params)
Adds an SQL expression value to be inserted for the specified column.
|
Insert |
valueNull(@NonNull String column)
Adds a
NULL value to be inserted for the specified column. |
Insert |
valueNullable(@NonNull String column,
Object value)
If specified value is null, adds a
NULL value for the specified column,
othwerise adds specified value as a value for the column. |
prepareStatement, prepareStatement, query, queryAndMap, queryAndMapAll, update, update, updateWithKeys, updateWithKeysAndMap, updateWithKeysAndMapAllpublic Insert ignore()
IGNORE clause to the query.public Insert value(@NonNull @NonNull String column, @NonNull @NonNull Object value)
column - Column name.value - Column value.public Insert valueExpr(@NonNull @NonNull String column, @NonNull @NonNull String expr, @NonNull Object... params)
column - Column name.expr - SQL expression.params - Expression parameters (for filling in placeholders ?).public Insert valueNull(@NonNull @NonNull String column)
NULL value to be inserted for the specified column.column - Column name.public Insert valueNullable(@NonNull @NonNull String column, Object value)
NULL value for the specified column,
othwerise adds specified value as a value for the column.column - Column name.value - Nullable value.public Insert onDuplicateKeyUpdateExcept(@NonNull String... keys)
ON DUPLICATE KEY UPDATE clause with all values added using
value*() methods, exclusing colums marked as keys.keys - Key columns that should not be updated.public String getSQL()
getSQL in class AbstractQuerypublic List<Object> getParams()
getParams in class AbstractQuery? in the SQL query).Copyright © 2021. All rights reserved.