forked from mirror/go-sqlite3
Use code
This commit is contained in:
parent
1704ea522d
commit
d3334c1381
|
@ -31,7 +31,7 @@ func (c *SQLiteConn) Backup(dest string, conn *SQLiteConn, src string) (*Backup,
|
||||||
// function returns SQLITE_DONE (Code 101)
|
// function returns SQLITE_DONE (Code 101)
|
||||||
func (b *Backup) Step(p int) (bool, error) {
|
func (b *Backup) Step(p int) (bool, error) {
|
||||||
ret := C.sqlite3_backup_step(b.b, C.int(p))
|
ret := C.sqlite3_backup_step(b.b, C.int(p))
|
||||||
if ret == 101 {
|
if ret == C.SQLITE_DONE {
|
||||||
return true, nil
|
return true, nil
|
||||||
} else if ret != 0 {
|
} else if ret != 0 {
|
||||||
return false, Error{Code: ErrNo(ret)}
|
return false, Error{Code: ErrNo(ret)}
|
||||||
|
|
Loading…
Reference in New Issue