Mercurial > dedupe
diff SqliteDBLink.hpp @ 92:f49023c61dac
Support for bulk insertion.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Mon, 21 Oct 2013 20:03:39 +0200 |
| parents | 7b7a959c993b |
| children | 308a718812ba |
line wrap: on
line diff
--- a/SqliteDBLink.hpp Mon Oct 21 16:21:54 2013 +0200 +++ b/SqliteDBLink.hpp Mon Oct 21 20:03:39 2013 +0200 @@ -10,9 +10,11 @@ ~SqliteDBLink(); virtual void addFile(const QString& path, quint64 size, - const QDateTime& dtime, const QByteArray& hash); + const QDateTime& dtime, const QByteArray& hash, + bool lazy = false); virtual void updateFile(const QString& path, quint64 size, - const QDateTime& dtime, const QByteArray& hash); + const QDateTime& dtime, const QByteArray& hash, + bool lazy = false); bool exists(const QString& path); DBStatus existsWithMtime(const QString& path, const QDateTime& mtime); @@ -26,9 +28,9 @@ virtual void deleteFileFromDB(const QString& path); private: - void addFile(const DBInfo& info); + void addFile(const DBInfo& info, bool lazy); bool tryAddFile(const DBInfo& info); - void updateFile(const DBInfo& dbinfo); + void updateFile(const DBInfo& dbinfo, bool lazy); QSqlDatabase db; static const QString connectionName;
