9#ifndef HEADER_SQLITEPP_VACKUP_IFACE_INCLUDED
10#define HEADER_SQLITEPP_VACKUP_IFACE_INCLUDED
13#include "database_iface.hpp"
14#include "exception_iface.hpp"
Online backup object.
Definition backup_iface.hpp:33
static std::unique_ptr< backup > init(database &dst, const string_param &dest_dbname, database &src, const string_param &src_dbname)
Initialize the backup.
Definition backup_iface.hpp:40
int remaining() const noexcept
Returns the number of pages still to be backed up after last step()
Definition backup_iface.hpp:87
int pagecount() const noexcept
Returns the total number of pages in the source database after last step()
Definition backup_iface.hpp:96
step_result
Result of a backup step.
Definition backup_iface.hpp:57
@ locked
Source database is being written, retry later (SQLITE_LOCKED)
Definition backup_iface.hpp:61
@ busy
Database is busy, retry later (SQLITE_BUSY)
Definition backup_iface.hpp:60
@ done
Backup finished (SQLITE_DONE)
Definition backup_iface.hpp:58
@ success
Backup step succeeded (SQLITE_OK)
Definition backup_iface.hpp:59
~backup() noexcept
Equivalent to sqlite3_backup_finish.
Definition backup_iface.hpp:51
step_result step(int page_count)
Copy up to page_count pages between the source and destination databases.
Definition backup_iface.hpp:69
A reference to a null terminated string.
Definition string_param.hpp:37
const T * c_str() const noexcept
Returns the stored pointer.
Definition string_param.hpp:50
Database Connection.
Definition database_iface.hpp:108
Exception used to report any SQLite errors.
Definition exception_iface.hpp:166
Base functionality for all fake wrapper classes
Definition handle.hpp:27
T * c_ptr() const noexcept
Access the real underlying SQLite type.
Definition handle.hpp:45
static backup * from(sqlite3_backup *obj) noexcept
Definition handle.hpp:41
ThinSQLite++ namespace.
Definition backup_iface.hpp:17