Example #1
0
File: db.go Project: C0rWin/fabric
// GetPropertyCF returns the value of a database property.
func (db *DB) GetPropertyCF(propName string, cf *ColumnFamilyHandle) string {
	cProp := C.CString(propName)
	defer C.free(unsafe.Pointer(cProp))
	cValue := C.rocksdb_property_value_cf(db.c, cf.c, cProp)
	defer C.free(unsafe.Pointer(cValue))
	return C.GoString(cValue)
}
Example #2
0
// GetPropertyCF returns the value of a database property for a column family.
func (self *DB) GetPropertyCF(cf *ColumnFamily, propName string) string {
	cprop := C.CString(propName)
	defer C.free(unsafe.Pointer(cprop))
	cValue := C.rocksdb_property_value_cf(self.c, cf.c, cprop)
	defer C.free(unsafe.Pointer(cValue))
	return C.GoString(cValue)
}