private get ctxMessage() {
const messageTransaction = this.db.transaction('messages', 'readwrite');
const messageStore = messageTransaction.objectStore('messages');
return { messageTransaction, messageStore };
}
private async getAllMessage(message: Message) {
const { messageStore ,messageTransaction } = this.ctxMessage;
const result = await messageStore.getAll();
return result
}
Encountering an issue where the transaction is not active when attempting to invoke the getAllMessage method.
Utilizing the idb npm package in my implementation.