insert method
Inserts a new record into the store.
Throws an AskarSessionException if the session is closed.
Implementation
Future<void> insert({
required String category,
required String name,
required String value,
Map<String, dynamic>? tags,
int? expiryMs,
}) async {
_throwOnNullHandle('Cannot insert with a closed session');
try {
final updateResult = await askarSessionUpdate(
handle!,
EntryOperation.insert,
category,
name,
value: value,
tags: tags,
expiryMs: expiryMs,
);
updateResult.errorCode.throwOnError();
} catch (e) {
throw AskarSessionException('Failed to insert on session: $e');
}
}