nextcloud-desktop/sqlite3_util.h
Juan Carlos Cornejo 5e3a475a87 Found a function online at
http://www.qtcentre.org/threads/36131-Attempting-to-use-Sqlite-backup-api-from-driver-handle-fails
on a post by chemmalion that allows one to save a memory sqlite3 database to file.

This is really neat because now the strain on the hardrive is gone!

This version loads the database on startup and saves it every 3 minutes to disk.
The database is saved upon closing the program as well.
2012-02-15 08:55:12 +01:00

9 lines
183 B
C++

#ifndef SQLITE3_UTIL_H
#define SQLITE3_UTIL_H
#include <QSqlDatabase>
namespace sqlite3_util {
bool sqliteDBMemFile( QSqlDatabase memdb, QString filename, bool save );
}
#endif