Is there any way to purge the complete a database? (iOS)

24 views
Skip to first unread message

Sandra

unread,
Feb 17, 2015, 5:32:16 PM2/17/15
to mobile-c...@googlegroups.com
Hello,
   In case I want to delete all the couchbase  database from my mobile device because, let's say, I want to do a sync from another bucket, Is there any way to purge the complete database instead of purging document by document?
   Note that I want to delete the database locally without affecting the data in the server.

Thanks,
Sandra

Jens Alfke

unread,
Feb 17, 2015, 5:36:41 PM2/17/15
to mobile-c...@googlegroups.com

On Feb 17, 2015, at 2:32 PM, Sandra <txm...@gmail.com> wrote:

   In case I want to delete all the couchbase  database from my mobile device because, let's say, I want to do a sync from another bucket, Is there any way to purge the complete database instead of purging document by document?
   Note that I want to delete the database locally without affecting the data in the server.

Just delete the database and then re-open it. In Objective-C that would be something like:
[db deleteDatabase: &error];
db = [mgr databaseNamed: dbName];

—Jens

Sandra

unread,
Feb 18, 2015, 1:18:37 PM2/18/15
to mobile-c...@googlegroups.com
thanks a lot Jens!!
BR
Sandra
Reply all
Reply to author
Forward
0 new messages