save method
Future<int>
save(
- Map<
String, dynamic> map, - String table, {
- List<
String> ? keys, - String? dbName = defaultDBName,
- dynamic tryToLogOperation = true,
override
Perform an INSERT or an UPDATE depending on the record state (UPSERT)
Implementation
@override
Future<int> save(Map<String, dynamic> map, String table,
{List<String>? keys,
String? dbName = defaultDBName,
tryToLogOperation = true}) async {
final res = await super.save(map, table, keys: keys, dbName: dbName);
if (tryToLogOperation && !_isSystemTable(table)) {
await logOperation(table, Operation.update, map[_getKeyField(table)],
dbName: dbName!);
}
return res;
}