insert method
Creates a new entry with fromAtSign, verbName and optional parameter lookupKey for lookup and plookup verbs. @param fromAtSign : The another user atsign @param verbName : The verb performed by the atsign user @param lookupKey : The optional parameter to hold lookup key when performing lookup or plookup verb.
Implementation
@override
Future<int?> insert(String fromAtSign, String verbName,
{String? lookupKey}) async {
int? result;
var entry = AccessLogEntry(fromAtSign, DateTime.now(), verbName, lookupKey);
try {
result = await _accessLogKeyStore.add(entry);
} on Exception catch (e) {
throw DataStoreException(
'Exception adding to access log:${e.toString()}');
} on HiveError catch (e) {
throw DataStoreException(
'Hive error adding to access log:${e.toString()}');
}
return result;
}