upsert method
- MonologKind kind,
- ChatId chatId
Creates or updates the provided chatId in the database.
Implementation
Future<void> upsert(MonologKind kind, ChatId chatId) async {
_cache[kind.name] = chatId;
await safe((db) async {
await db
.into(db.monologs)
.insert(chatId.toDb(kind), mode: InsertMode.insertOrReplace);
}, tag: 'monolog.upsert(${kind.name}, $chatId)');
}