// GetProperty returns the value of a database property. func (db *DB) GetProperty(propName string) string { cprop := C.CString(propName) defer C.free(unsafe.Pointer(cprop)) cValue := C.rocksdb_property_value(db.c, cprop) defer C.free(unsafe.Pointer(cValue)) return C.GoString(cValue) }
// PropertyValue returns the value of a database property. // // Examples of properties include "rocksdb.stats", "rocksdb.sstables", // and "rocksdb.num-files-at-level0". func (db *DB) PropertyValue(propName string) string { cname := C.CString(propName) value := C.GoString(C.rocksdb_property_value(db.Ldb, cname)) C.free(unsafe.Pointer(cname)) return value }