Closed rsmckinney closed 4 months ago
manifold-sql should provide a type-safe, well integrated API for batch processing.
Proposal:
Use addBatchChange to batch many invocations of the same parameterized statement as one database call.
addBatchChange
List<String> countries = loadCountries)(); . . . Sakila.addBatchChange(ctx -> { for(String country: countries) { "[.sql/] INSERT INTO country (country) VALUES (:name)".execute(ctx, country); } } . . . Sakila.commit();
Use addBatchChange to batch many non-parameterized SQL statements as one database call.
Sakila.addBatchChange(ctx -> { "[.sql/] INSERT INTO country (country) VALUES ('Canada')".execute(ctx); "[.sql/] INSERT INTO country (country) VALUES ('Mexico')".execute(ctx); "[.sql/] INSERT INTO country (country) VALUES ('Belize')".execute(ctx); . . . } } . . . Sakila.commit();
feature added with release 2024.1.20
manifold-sql should provide a type-safe, well integrated API for batch processing.
Proposal:
Use
addBatchChange
to batch many invocations of the same parameterized statement as one database call.Use
addBatchChange
to batch many non-parameterized SQL statements as one database call.