// Close the database. // See: http://unqlite.org/c_api/unqlite_close.html func (u *Unqlite) Close() error { if rc := C.unqlite_close(u.db); rc != C.UNQLITE_OK { return ErrCode(rc) } return nil }
func (u *Unqlite) Close() error { var err error if u.db != nil { e := C.unqlite_close(u.db) err = code2Error(e) u.db = nil } return err }
// Close ... func (db *Database) Close() (err error) { if db.handle != nil { res := C.unqlite_close(db.handle) if res != C.UNQLITE_OK { err = UnQLiteError(res) } db.handle = nil } return }
// Close closes the database handle. func (h *Handle) Close() error { if h == nil || h.db == nil { return errors.New("nil unqlite database") } rv := C.unqlite_close(h.db) if rv != C.UNQLITE_OK { return Errno(rv) } h.db = nil return nil }