insert method
Future<int>
insert(
- Map<
String, dynamic> map, - String table, {
- String? dbName = defaultDBName,
- dynamic tryToLogOperation = true,
override
Insert a new record in the passed table based on the map object and return the new id
Implementation
@override
Future<int> insert(Map<String, dynamic> map, String table,
{String? dbName = defaultDBName, tryToLogOperation = true}) async {
final res = await super.insert(map, table, dbName: dbName);
//Log
if (tryToLogOperation && !_isSystemTable(table)) {
await logOperation(table, Operation.insert, map[_getKeyField(table)],
dbName: dbName!);
}
return res;
}