Beispiel #1
0
    def DELETE(self, db):
        LOG.debug('deleting database %s' % db)

        if self.client.db_delete(db):
            return ok()

        return error()
Beispiel #2
0
    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()
Beispiel #3
0
    def PUT(self, db):
        LOG.debug('adding database %s' % db)

        if self.client.db_init(db):
            return ok()

        return error()
Beispiel #4
0
    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()