Mercurial > dedupe
diff SqliteDBLink.hpp @ 94:93981e675d67
Full support for bulkcommits.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Tue, 22 Oct 2013 14:11:50 +0200 |
| parents | 308a718812ba |
| children | c7da835ea912 |
line wrap: on
line diff
--- a/SqliteDBLink.hpp Tue Oct 22 11:53:54 2013 +0200 +++ b/SqliteDBLink.hpp Tue Oct 22 14:11:50 2013 +0200 @@ -4,6 +4,7 @@ #include <QtSql/QSqlDatabase> #include <QtCore/QPair> +#include <QtCore/QVariant> class SqliteDBLink : public FileDBLink { public: @@ -30,7 +31,7 @@ bool commit(); private: - typedef enum {Add, Update } OperationType; + typedef enum {None = 0, Add, Update } OperationType; typedef QPair<DBInfo, OperationType> Operation; void addFile(const DBInfo& info, bool lazy = false); @@ -43,7 +44,11 @@ QSqlQuery* preparedSizePrefixQuery; QSqlQuery* preparedSizeQuery; QSqlQuery* preparedTryAddQuery; + QSqlQuery* preparedUpdateQuery; QList<Operation> operations; + void executeOperation(QVariantList& paths, QVariantList& sizes, + QVariantList& mtimes, QVariantList& checksums, + OperationType operation); }; #endif //MEMORYDBLINK_HPP
