Exemple #1
0
    def __update_next_id(self):
        """Update the bookkeeping structure at the head of the file
        with the new next available object ID

        Parameters
        ----------
        None

        Returns
        -------
        None"""
        self.db_map.seek(0)
        bin_str = structs.pack_bookkeeper(self.__next_id)
        self.db_map.write(bin_str)
Exemple #2
0
    def __setup_new_file(self):
        """Private method that writes the object files bookkeeper structure
        at the beginning of the file.

        Parameters
        ----------
        None

        Returns
        -------
        None
        """
        self.db_map.seek(0)
        bin_str = structs.pack_bookkeeper(0)
        self.db_map.write(bin_str)