batchedInsertOrReplace method
List<Statement>
batchedInsertOrReplace(
- QualifiedTablename table,
- List<
String> columns, - List<
Map< records,String, Object?> > - List<
String> conflictCols, - List<
String> updateCols, - int maxSqlParameters,
override
Inserts a batch of rows into a table, replacing them if they already exist.
Implementation
@override
List<Statement> batchedInsertOrReplace(
QualifiedTablename table,
List<String> columns,
List<Map<String, Object?>> records,
List<String> conflictCols,
List<String> updateCols,
int maxSqlParameters,
) {
final baseSql =
'INSERT OR REPLACE INTO $table (${columns.join(', ')}) VALUES ';
return prepareInsertBatchedStatements(
baseSql,
columns,
records,
maxSqlParameters,
);
}