Beispiel #1
0
func (self *KcDb) Close() error {
	defer C.kcdbdel(self.cdb)
	if C.kcdbclose(self.cdb) == kcFalse {
		return errors.New(fmt.Sprintf("close: %s", C.GoString(C.kcecodename(C.kcdbecode(self.cdb)))))
	}
	return nil
}
Beispiel #2
0
// Closes the database, make sure you always call this method after using the database.
//
// You can do it using the defer statement:
//
//     db := Open("my_db.kch", WRITE)
//     defer db.Close()
func (d *DB) Close() {
	C.kcdbclose(d.db)
	C.kcdbdel(d.db)
}
Beispiel #3
0
func (kc *KCDB) Del() {
	C.kcdbdel(kc.db)
}