mirror of
https://gitee.com/shuto/cordova-plugin-dbcopy.git
synced 2024-10-06 09:42:06 +08:00
Update README.md
This commit is contained in:
parent
720ae214cf
commit
89de6d361c
16
README.md
16
README.md
@ -22,31 +22,31 @@ Right Click on the Resources directory, then click Add files.
|
||||
|
||||
Currently there are two methods supported by the plugin.
|
||||
|
||||
1.**Copy** - This Method allows you the copy the database from the asset directory(for Android) or Resource directory (for iOS).
|
||||
* **Copy** - This Method allows you the copy the database from the asset directory(for Android) or Resource directory (for iOS).
|
||||
|
||||
````
|
||||
window.plugins.sqlDB.copy(dbname,success,error);
|
||||
````
|
||||
Here -
|
||||
|
||||
**dbname** -> Is the name of the database you want to copy. The dbname can be filename (without extensions) or filename.db or filename.sqlite. The plugin will look for and copy the file according to the filename provided here. And the same file name should be used while opening the database via [SQLitePlugin](https://github.com/brodysoft/Cordova-SQLitePlugin).
|
||||
**dbname** -> Is the name of the database you want to copy. The dbname can be filename (without extensions) or filename.db or filename.sqlite. The plugin will look for and copy the file according to the filename provided here. And the same file name should be used while opening the database via [SQLitePlugin](https://github.com/brodysoft/Cordova-SQLitePlugin).
|
||||
|
||||
**success** -> function will be called if the db is copied sucessfully.
|
||||
**success** -> function will be called if the db is copied sucessfully.
|
||||
|
||||
**error** -> function will be called if the there is some problem in copying the db or the file already exists on the location.
|
||||
**error** -> function will be called if the there is some problem in copying the db or the file already exists on the location.
|
||||
|
||||
2.**Remove** - This method allows you to remove the database from the apps default database storage location.
|
||||
* **Remove** - This method allows you to remove the database from the apps default database storage location.
|
||||
|
||||
````
|
||||
window.plugins.sqlDB.remove(dbname,success,error);
|
||||
````
|
||||
Here -
|
||||
|
||||
**dbname** -> Is the name of the database you want to copy. The dbname can be filename (without extensions) or filename.db or filename.sqlite. The plugin will look for and copy the file according to the filename provided here. And the same file name should be used while opening the database via [SQLitePlugin](https://github.com/brodysoft/Cordova-SQLitePlugin).
|
||||
**dbname** -> Is the name of the database you want to copy. The dbname can be filename (without extensions) or filename.db or filename.sqlite. The plugin will look for and copy the file according to the filename provided here. And the same file name should be used while opening the database via [SQLitePlugin](https://github.com/brodysoft/Cordova-SQLitePlugin).
|
||||
|
||||
**success** -> function will be called if the db is copied sucessfully.
|
||||
**success** -> function will be called if the db is copied sucessfully.
|
||||
|
||||
**error** -> function will be called if the there is some problem in copying the db or the file already exists on the location.
|
||||
**error** -> function will be called if the there is some problem in copying the db or the file already exists on the location.
|
||||
|
||||
###Example Usage
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user