Exemplo n.º 1
0
    def get_property(self, name):
        ''' Get an internal property value if it exists. Current
        properties that are supported are:

        * "leveldb.num-files-at-level<N>"
          return the number of files at level <N>, where <N> is an
          ASCII representation of a level number (e.g. "0").

        * "leveldb.stats"
          returns a multi-line string that describes statistics
          about the internal operation of the DB.

        :param name: The name of the property to retrieve
        :returns: The value of the property if it exists, or None
        '''
        result = None
        value  = LDB.leveldb_property_value(self.database, name)
        return as_python_string(value)