Beispiel #1
0
func (option *Options) Set_create_if_exists(flag bool) {
	if flag {
		C.leveldb_options_set_error_if_exists(option.options, C.uchar(1))
	} else {
		C.leveldb_options_set_error_if_exists(option.options, C.uchar(0))
	}
}
Beispiel #2
0
// SetErrorIfExists, if passed true, will cause the opening of a database that
// already exists to throw an error.
func (o *Options) SetErrorIfExists(error_if_exists bool) {
	eie := boolToUchar(error_if_exists)
	C.leveldb_options_set_error_if_exists(o.Opt, eie)
}