insertOrReplace method
Statement
insertOrReplace(
- QualifiedTablename table,
- List<
String> columns, - List<
Object?> values, - List<
String> conflictCols, - List<
String> updateCols,
override
Insert a row into a table, replacing it if it already exists.
Implementation
@override
Statement insertOrReplace(
QualifiedTablename table,
List<String> columns,
List<Object?> values,
List<String> conflictCols,
List<String> updateCols,
) {
return Statement(
'''
INSERT OR REPLACE INTO $table (${columns.join(', ')})
VALUES (${columns.map((_) => '?').join(', ')})
''',
values,
);
}