Skip to content

Commit

Permalink
Add documents for class sqlite::backup
Browse files Browse the repository at this point in the history
  • Loading branch information
Yen Chi Hsuan committed Mar 14, 2015
1 parent 5b8d010 commit 982cd4f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions include/sqlite/backup.hpp
Expand Up @@ -7,11 +7,37 @@
struct sqlite3_backup;

namespace sqlite {
/** \brief \a backup is a class for representing SQLite backup operations
* An object of this class is not copyable
*/
struct backup: boost::noncopyable {
/** \brief \a backup constructor
* \param conn_to takes a reference to the \a connection object
* of the destination database
* \param conn_from takes a reference to the \a connection object
* of the source database
*/
backup(connection& conn_to, connection& conn_from);

/** \brief \a backup destructor. The backup operation is automatically
* finished after the object destructed.
*/
~backup();


/** \brief Do a backup step
* \param nPage the number of pages to backup in this step. If a
* negative integer is given, all pages are backuped. If this
* parameter is omitted, -1 is used.
*/
bool step(int nPage = -1);

/** \brief Finish the backup operation
* This is used for flushing current backup operation. After
* this call, the backup object should not be used anymore.
*/
void finish();

private:
sqlite3* get_to_handle() const;
private:
Expand Down

0 comments on commit 982cd4f

Please sign in to comment.