batchedInsertOrReplace method

  1. @override
List<Statement> batchedInsertOrReplace(
  1. QualifiedTablename table,
  2. List<String> columns,
  3. List<Map<String, Object?>> records,
  4. List<String> conflictCols,
  5. List<String> updateCols,
  6. 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,
  );
}