public interface SqlInsert
| Modifier and Type | Interface and Description |
|---|---|
static interface |
SqlInsert.Apply |
| Modifier and Type | Method and Description |
|---|---|
SqlInsert |
apply(SqlInsert.Apply apply) |
SqlInsert |
argBigDecimal(BigDecimal arg) |
SqlInsert |
argBigDecimal(String argName,
BigDecimal arg) |
SqlInsert |
argBlobBytes(byte[] arg) |
SqlInsert |
argBlobBytes(String argName,
byte[] arg) |
SqlInsert |
argBlobStream(InputStream arg) |
SqlInsert |
argBlobStream(String argName,
InputStream arg) |
SqlInsert |
argBoolean(Boolean arg) |
SqlInsert |
argBoolean(String argName,
Boolean arg) |
SqlInsert |
argClobReader(Reader arg) |
SqlInsert |
argClobReader(String argName,
Reader arg) |
SqlInsert |
argClobString(String arg) |
SqlInsert |
argClobString(String argName,
String arg) |
SqlInsert |
argDate(Date arg) |
SqlInsert |
argDate(String argName,
Date arg) |
SqlInsert |
argDateNowPerApp() |
SqlInsert |
argDateNowPerApp(String argName) |
SqlInsert |
argDateNowPerDb() |
SqlInsert |
argDateNowPerDb(String argName) |
SqlInsert |
argDouble(Double arg) |
SqlInsert |
argDouble(String argName,
Double arg) |
SqlInsert |
argFloat(Float arg) |
SqlInsert |
argFloat(String argName,
Float arg) |
SqlInsert |
argInteger(Integer arg) |
SqlInsert |
argInteger(String argName,
Integer arg) |
SqlInsert |
argLocalDate(LocalDate arg) |
SqlInsert |
argLocalDate(String argName,
LocalDate arg) |
SqlInsert |
argLong(Long arg) |
SqlInsert |
argLong(String argName,
Long arg) |
SqlInsert |
argPkLong(Long pkValue) |
SqlInsert |
argPkLong(String argName,
Long pkValue) |
SqlInsert |
argPkSeq(String sequenceName) |
SqlInsert |
argPkSeq(String argName,
String sequenceName)
Use this method to populate the primary key value (assumed to be type Long)
from a sequence in the database.
|
SqlInsert |
argString(String arg) |
SqlInsert |
argString(String argName,
String arg) |
SqlInsert |
batch()
Call this between setting rows of parameters for a SQL statement.
|
int |
insert()
Perform the insert into the database without any verification of how many rows
were affected.
|
void |
insert(int expectedRowsUpdated)
Perform the insert into the database.
|
void |
insertBatch()
Insert multiple rows in one database call.
|
int[] |
insertBatchUnchecked()
Insert multiple rows in one database call.
|
<T> T |
insertReturning(String tableName,
String primaryKeyColumnName,
RowsHandler<T> rowsHandler,
String... otherColumnNames) |
Long |
insertReturningPkSeq(String primaryKeyColumnName)
Use this method in conjunction with argPkSeq() to optimize inserts where the
primary key is being populated from a database sequence at insert time.
|
SqlInsert |
withArgs(SqlArgs args) |
@Nonnull @CheckReturnValue SqlInsert argBoolean(Boolean arg)
@Nonnull @CheckReturnValue SqlInsert argInteger(Integer arg)
@Nonnull @CheckReturnValue SqlInsert argLong(Long arg)
@Nonnull @CheckReturnValue SqlInsert argFloat(Float arg)
@Nonnull @CheckReturnValue SqlInsert argDouble(Double arg)
@Nonnull @CheckReturnValue SqlInsert argBigDecimal(BigDecimal arg)
@Nonnull @CheckReturnValue SqlInsert argBigDecimal(@Nonnull String argName, BigDecimal arg)
@Nonnull @CheckReturnValue SqlInsert argString(String arg)
@Nonnull @CheckReturnValue SqlInsert argDate(Date arg)
@Nonnull @CheckReturnValue SqlInsert argLocalDate(LocalDate arg)
@Nonnull @CheckReturnValue SqlInsert argLocalDate(@Nonnull String argName, LocalDate arg)
@Nonnull @CheckReturnValue SqlInsert argDateNowPerApp()
@Nonnull @CheckReturnValue SqlInsert argDateNowPerApp(@Nonnull String argName)
@Nonnull @CheckReturnValue SqlInsert argDateNowPerDb()
@Nonnull @CheckReturnValue SqlInsert argDateNowPerDb(@Nonnull String argName)
@Nonnull @CheckReturnValue SqlInsert argBlobBytes(byte[] arg)
@Nonnull @CheckReturnValue SqlInsert argBlobBytes(@Nonnull String argName, byte[] arg)
@Nonnull @CheckReturnValue SqlInsert argBlobStream(InputStream arg)
@Nonnull @CheckReturnValue SqlInsert argBlobStream(@Nonnull String argName, InputStream arg)
@Nonnull @CheckReturnValue SqlInsert argClobString(String arg)
@Nonnull @CheckReturnValue SqlInsert argClobString(@Nonnull String argName, String arg)
@Nonnull @CheckReturnValue SqlInsert argClobReader(Reader arg)
@Nonnull @CheckReturnValue SqlInsert argClobReader(@Nonnull String argName, Reader arg)
@Nonnull @CheckReturnValue SqlInsert withArgs(SqlArgs args)
@Nonnull @CheckReturnValue SqlInsert apply(SqlInsert.Apply apply)
SqlInsert batch()
int insert()
void insert(int expectedRowsUpdated)
WrongNumberOfRowsException
if it does not match.void insertBatch()
int[] insertBatchUnchecked()
@CheckReturnValue Long insertReturningPkSeq(String primaryKeyColumnName)
This version of insert expects exactly one row to be inserted, and will throw a DatabaseException if that isn't the case.
<T> T insertReturning(String tableName, String primaryKeyColumnName, RowsHandler<T> rowsHandler, String... otherColumnNames)
@Nonnull @CheckReturnValue SqlInsert argPkSeq(@Nonnull String sequenceName)
@Nonnull @CheckReturnValue SqlInsert argPkSeq(@Nonnull String argName, @Nonnull String sequenceName)
@Nonnull @CheckReturnValue SqlInsert argPkLong(Long pkValue)
@Nonnull @CheckReturnValue SqlInsert argPkLong(String argName, Long pkValue)
Copyright © 2020. All rights reserved.