ujjwalguptaofficial/JsStore

close the connection

croraf opened this issue · 2 comments

Summary

There should be a way to close the connection to the db.

Basic example

connection.close();

Motivation

If I make a connection and a request but my connection should be closed in the meantime there is no API for that. So my connection gets fulfilled anyways (and my fulfill callback runs) .

JsStore manages the indexedb connection internally. It closes the connection when its find there is no activity.

But if you want to do it manually - you can do it so by using terminate :

https://jsstore.net/tutorial/terminate/

I would suggest not to worry about it unless you are doing something very specific which needs connection control.