Module Sqlite3.Backup
val init : dst:db -> dst_name:string -> src:db -> src_name:string -> t
init ~dst ~dst_name ~src ~src_name
initializes a backup from the databasesrc
/src_name
to the databasedst
/dst_name
.- raises SqliteError
if there is already a read or read-write transaction open on the destination database
val step : t -> int -> Rc.t
step backup pagecount
will copy up topagecount
pages between the associated databases ofbackup
.
val finish : t -> Rc.t
finish backup
destroys the associationbackup
; this is to be called afterstep
returnsSQLITE_DONE
.
val remaining : t -> int
remaining backup
returns the number of pages still to be backed up inbackup
.
val pagecount : t -> int
pagecount backup
returns the total number of pages in the source database ofbackup
.