an-rahulpandey / cordova-plugin-dbcopy

Copy SQLite Database from www folder to default app database location
Apache License 2.0
89 stars 47 forks source link

Check if database already exists #49

Closed billymahmood closed 6 years ago

billymahmood commented 6 years ago

Hi,

This is a great plugin, however I wanted to ask if there is a way to check if the database already exists before trying to copy it over?

Thank you

an-rahulpandey commented 6 years ago

This method doesn't copy the database, if the database already exists - window.plugins.sqlDB.copy(dbname, location, success,error); It goes to error callback with the db exists response and error code, see README.md for more details.