예제 #1
0
파일: db.go 프로젝트: 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)
}
예제 #2
0
파일: cfam.go 프로젝트: rdallman/gorocksdb
// 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)
}