connection.dropDb() not works #253
-
jsstore is awesome, thank you for it :) when use it, i got a little problem here : using your example code 'JsStore_Demo', it success to create and connect, but fail to drop db by your exmaple code : connection.dropDb().then(function() { error info is --- {message: "Cannot read properties of undefined (reading 'name')", type: 'TypeError'} |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@Achi-Z could you provide a reproducable repo ? I have added test cases for dropDb and it has passed, so there is a chance something is different in your scenario. |
Beta Was this translation helpful? Give feedback.
-
` var dbName = 'JsStore_Demo'; async function initDb() { // initDb(); async function removeDbA() { all action of droping are not work :( |
Beta Was this translation helpful? Give feedback.
-
that is because you are not initiating the database, you need to initiate db first -> then you can call dropDb. If you want to delete three db, initiate each db and then delete. you can create multiple instance of jsstore for parallely deleting db. |
Beta Was this translation helpful? Give feedback.
that is because you are not initiating the database, you need to initiate db first -> then you can call dropDb.
If you want to delete three db, initiate each db and then delete. you can create multiple instance of jsstore for parallely deleting db.