updateEntryByServerId method
Update an entry by its serverId as key.
Implementation
Future<bool> updateEntryByServerId(T entry) async {
try {
await entry.beforeSave(false);
var db = await _initializeDB();
var map = <String, dynamic>{};
entry.modificationTime.value = DateTime.now();
_setEntryToMap(entry, map);
map.remove(idColumnName);
await db.update(tableName, map,
where: "serverId=${entry.serverId.value}");
await entry.afterSave(false);
_fireChangeListners(EntryChangeType.Modification, entry);
return true;
} catch (e) {
print(e);
return false;
}
}