'Closes the database'

def close(self):

    if (not self.opened):
        raise DatabaseConflict('Not    opened')
    self.id_ind = None
    self.indexes_names = {}
    self.storage = None
    for index in self.indexes:
        index.close_index()
    self.indexes = []
    self.opened = False
    return True
