Is there any API to remove a collection without initialize the collection?
Here is my scenario. There is a KeyCollection that store credential from server to initialize the other collection. User has to key in credential to unlock the KeyCollection. It is use to cater forget password scenario that do not wipe off(destroy) the whole database which is request by our client. User forgot the password of a collection, so the system will only remove the Keycollection and init with new user credential and get the credential from server again.
I unable to remove a collection without initialize it, and below is the code that remove the collection from device. Is there any alternative to cater the scenario or remove the collection in order for me to .init again?
.Get Use get to create an accessor to the collection. You must call init before you call get otherwise the result of get is undefined (From IBM Website)
var options = {};
WL.JSONStore.get(collectionName).removeCollection().then(function (removeCollectionReturnCode) {
}).fail(function (errorObject) {
});