SqlInsert.Apply| Constructor and Description |
|---|
SqlInsertImpl(Connection connection,
DatabaseMock mock,
String sql,
Options options) |
| 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 arg) |
SqlInsert |
argPkLong(String argName,
Long arg) |
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> handler,
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) |
public SqlInsertImpl(Connection connection, DatabaseMock mock, String sql, Options options)
@Nonnull public SqlInsert argBoolean(Boolean arg)
argBoolean in interface SqlInsert@Nonnull public SqlInsert argBoolean(@Nonnull String argName, Boolean arg)
argBoolean in interface SqlInsert@Nonnull public SqlInsert argInteger(Integer arg)
argInteger in interface SqlInsert@Nonnull public SqlInsert argInteger(@Nonnull String argName, Integer arg)
argInteger in interface SqlInsert@Nonnull public SqlInsert argBigDecimal(BigDecimal arg)
argBigDecimal in interface SqlInsert@Nonnull public SqlInsert argBigDecimal(@Nonnull String argName, BigDecimal arg)
argBigDecimal in interface SqlInsert@Nonnull public SqlInsert argLocalDate(@Nonnull String argName, LocalDate arg)
argLocalDate in interface SqlInsert@Nonnull public SqlInsert argLocalDate(LocalDate arg)
argLocalDate in interface SqlInsert@Nonnull public SqlInsert argDateNowPerApp()
argDateNowPerApp in interface SqlInsert@Nonnull public SqlInsert argDateNowPerApp(@Nonnull String argName)
argDateNowPerApp in interface SqlInsert@Nonnull public SqlInsert argDateNowPerDb()
argDateNowPerDb in interface SqlInsert@Nonnull public SqlInsert argDateNowPerDb(@Nonnull String argName)
argDateNowPerDb in interface SqlInsert@Nonnull public SqlInsert argBlobBytes(byte[] arg)
argBlobBytes in interface SqlInsert@Nonnull public SqlInsert argBlobBytes(@Nonnull String argName, byte[] arg)
argBlobBytes in interface SqlInsert@Nonnull public SqlInsert argBlobStream(InputStream arg)
argBlobStream in interface SqlInsert@Nonnull public SqlInsert argBlobStream(@Nonnull String argName, InputStream arg)
argBlobStream in interface SqlInsert@Nonnull public SqlInsert argClobString(String arg)
argClobString in interface SqlInsert@Nonnull public SqlInsert argClobString(@Nonnull String argName, String arg)
argClobString in interface SqlInsert@Nonnull public SqlInsert argClobReader(Reader arg)
argClobReader in interface SqlInsert@Nonnull public SqlInsert argClobReader(@Nonnull String argName, Reader arg)
argClobReader in interface SqlInsert@Nonnull public SqlInsert apply(SqlInsert.Apply apply)
public SqlInsert batch()
SqlInsertpublic int insert()
SqlInsertpublic void insert(int expectedRowsUpdated)
SqlInsertWrongNumberOfRowsException
if it does not match.public void insertBatch()
SqlInsertinsertBatch in interface SqlInsertpublic int[] insertBatchUnchecked()
SqlInsertinsertBatchUnchecked in interface SqlInsertpublic Long insertReturningPkSeq(String primaryKeyColumnName)
SqlInsertThis version of insert expects exactly one row to be inserted, and will throw a DatabaseException if that isn't the case.
insertReturningPkSeq in interface SqlInsertpublic <T> T insertReturning(String tableName, String primaryKeyColumnName, RowsHandler<T> handler, String... otherColumnNames)
insertReturning in interface SqlInsert@Nonnull public SqlInsert argPkSeq(@Nonnull String argName, @Nonnull String sequenceName)
SqlInsertCopyright © 2020. All rights reserved.