Exemplo n.º 1
0
    def commit(self):
        ''' Commit the total write batch operation. After this
        call, this write batch instance may no longer be used.

        :throws DatabaseException: If an error has occurred
        '''
        if LDB and self.write_batch:
            self.database.write(self.write_batch, self.synchronous)
            LDB.leveldb_writebatch_destroy(self.write_batch)
            self.write_batch = None