Module is.codion.framework.db.core
Package is.codion.framework.db
Interface EntityConnection.BatchInsert.Builder
- Enclosing interface:
EntityConnection.BatchInsert
public static interface EntityConnection.BatchInsert.Builder
A builder for
EntityConnection.BatchInsert operation.-
Method Summary
Modifier and TypeMethodDescriptionbatchSize(int batchSize) build()voidexecute()Builds and executes this insert operationonInsert(Consumer<Collection<Entity.Key>> onInsert) progressReporter(Consumer<Integer> progressReporter)
-
Method Details
-
batchSize
- Parameters:
batchSize- the commit batch size- Returns:
- this builder instance
-
progressReporter
- Parameters:
progressReporter- if specified this will be used to report batch progress- Returns:
- this builder instance
-
onInsert
- Parameters:
onInsert- notified each time a batch is inserted, providing the inserted keys- Returns:
- this builder instance
-
execute
void execute()Builds and executes this insert operation- Throws:
DatabaseException- in case of an exception
-
build
EntityConnection.BatchInsert build()- Returns:
- a new
EntityConnection.BatchInsertinstance
-