def DELETE(self, db): LOG.debug('deleting database %s' % db) if self.client.db_delete(db): return ok() return error()
def DELETE(self, db, doc): LOG.debug('with database %s deleting document %s' % (db, doc)) if self.client.doc_delete(db, doc): return ok() return error()
def PUT(self, db): LOG.debug('adding database %s' % db) if self.client.db_init(db): return ok() return error()
def PUT(self, db, doc, content=None): LOG.debug('with database %s adding document %s' % (db, doc)) if self.client.doc_save(db, doc, json.loads(content)): return ok() return error()