You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am able to create a 'PERM' database with data using nSQL().createDatabase() and then am able to immediately lists the databases using nSQL().listDatabases(), HOWEVER if I reload my app and only try listing the databases again I get nothing even though the local databases still exist in my browser. I looked in the nano code within core/lib/index.js and noticed that nanoSQL.prototype.connect() is the only place that sets the 'this.dbs' object (which is used to list the databases in nSQL().listDatabases().
nSQL().listDatabases() needs to be able to list databases that exist. I am also not able to retrieve rows from existing databases if I do not 'recreate' the databases each time I reload my app, even though the data is there there from the last time I ran my app. Again, the core code needs the 'this.dbs' object to somehow create connects to the existing databases using something similar to what is created for each database in 'nanoSQL.prototype.connect()'.
Just from a brief review of your code I'm not sure how you would list existing indexedDb databases unless you are tracking the database keys/names in localStorage in order to call the indexedDb.open() function.
The text was updated successfully, but these errors were encountered:
kuhlaid
changed the title
listDatabases function not pulling existing databases
listDatabases function not pulling existing databases from indexedDb
Apr 6, 2020
Which version are you using?
2.3.7
Describe the bug
I am able to create a 'PERM' database with data using nSQL().createDatabase() and then am able to immediately lists the databases using nSQL().listDatabases(), HOWEVER if I reload my app and only try listing the databases again I get nothing even though the local databases still exist in my browser. I looked in the nano code within core/lib/index.js and noticed that nanoSQL.prototype.connect() is the only place that sets the 'this.dbs' object (which is used to list the databases in nSQL().listDatabases().
nSQL().listDatabases() needs to be able to list databases that exist. I am also not able to retrieve rows from existing databases if I do not 'recreate' the databases each time I reload my app, even though the data is there there from the last time I ran my app. Again, the core code needs the 'this.dbs' object to somehow create connects to the existing databases using something similar to what is created for each database in 'nanoSQL.prototype.connect()'.
Just from a brief review of your code I'm not sure how you would list existing indexedDb databases unless you are tracking the database keys/names in localStorage in order to call the indexedDb.open() function.
The text was updated successfully, but these errors were encountered: