コード例 #1
0
ファイル: backup.go プロジェクト: gidden/cloudlus
// Progress returns the number of pages that still need to be backed up and the
// total number of pages in the source database. The values are updated after
// each call to Step and are reset to 0 after the backup is closed. The total
// number of pages may change if the source database is modified during the
// backup operation.
// [http://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupremaining]
func (b *Backup) Progress() (remaining, total int) {
	if b.bkup != nil {
		remaining = int(C.sqlite3_backup_remaining(b.bkup))
		total = int(C.sqlite3_backup_pagecount(b.bkup))
	}
	return
}
コード例 #2
0
ファイル: sqlite.go プロジェクト: vaibhav2800/forge
func (b *Backup) Status() BackupStatus {
	return BackupStatus{int(C.sqlite3_backup_remaining(b.sb)), int(C.sqlite3_backup_pagecount(b.sb))}
}
コード例 #3
0
ファイル: backup.go プロジェクト: kleopatra999/go-sqlite3
func (b *Backup) Remaining() int {
	return int(C.sqlite3_backup_remaining(b.b))
}