func (b *Backup) Finish() error { ret := C.sqlite3_backup_finish(b.b) if ret != 0 { return Error{Code: ErrNo(ret)} } return nil }
func (b *Backup) Close() error { if b.sb == nil { return errors.New("backup already closed") } C.sqlite3_backup_finish(b.sb) b.sb = nil return nil }
func (b *Backup) Close() os.Error { if b.sb == nil { return os.EINVAL } C.sqlite3_backup_finish(b.sb) b.sb = nil return nil }
func (b *Backup) Close() error { if b.sb == nil { return os.ErrInvalid } C.sqlite3_backup_finish(b.sb) b.sb = nil return nil }
func (b *SQLiteBackup) Close() error { ret := C.sqlite3_backup_finish(b.b) if ret != 0 { return Error{Code: ErrNo(ret)} } b.b = nil runtime.SetFinalizer(b, nil) return nil }
// Close releases all resources associated with the backup operation. It is safe // to call this method prior to backup completion to abort the operation. // [http://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish] func (b *Backup) Close() error { if bkup := b.bkup; bkup != nil { b.bkup = nil runtime.SetFinalizer(b, nil) if rc := C.sqlite3_backup_finish(bkup); rc != OK { return libErr(rc, b.dst.db) } } return nil }
// Close finishes/stops the backup. // (See http://sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish) func (b *Backup) Close() error { if b == nil { return errors.New("nil sqlite backup") } rv := C.sqlite3_backup_finish(b.sb) if rv != C.SQLITE_OK { return b.dst.error(rv, "backup finish failed") } b.sb = nil return nil }
// Close finishes/stops the backup. // (See http://sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish) func (b *Backup) Close() error { if b == nil { return errors.New("nil sqlite backup") } rv := C.sqlite3_backup_finish(b.sb) if rv != C.SQLITE_OK { return Errno(rv) } b.sb = nil return nil }
// Close finishes/stops the backup. // (See http://sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish) func (b *Backup) Close() error { if b == nil { return errors.New("nil sqlite backup") } if b.sb == nil { return nil } rv := C.sqlite3_backup_finish(b.sb) // must be called only once b.sb = nil if rv != C.SQLITE_OK { return b.dst.error(rv, "backup finish failed") } return nil }
func (b *SQLiteBackup) Close() error { ret := C.sqlite3_backup_finish(b.b) // sqlite3_backup_finish() never fails, it just returns the // error code from previous operations, so clean up before // checking and returning an error b.b = nil runtime.SetFinalizer(b, nil) if ret != 0 { return Error{Code: ErrNo(ret)} } return nil }
func (b *Backup) Finish() error { return Error{Code: ErrNo(C.sqlite3_backup_finish(b.b))} }
func (b *Backup) Finish() error { if e := Errno(C.sqlite3_backup_finish(b.cptr)); e != OK { return e } return nil }
// Finish should be called when the backup is done, an error occured or when // the application wants to abandon the backup operation. func (b *Backup) Finish() error { return SQLiteError(C.sqlite3_backup_finish(b.cptr)) }