Commit ad4e86b7 authored by Lukas Appelhans's avatar Lukas Appelhans
Browse files

It's deltas not delta

parent a27670b9
......@@ -38,6 +38,7 @@ SQLiteConnection::~SQLiteConnection()
}
}
//FIXME: If a query fails somewhere we should wipe intBindings and stringBindings... else we run into problems with the new one
/*
* Executes a query
*/
......@@ -55,7 +56,7 @@ SQLiteResource SQLiteConnection::query(QString q)
int retvalue = sqlite3_prepare_v2(dbHandle, query, -1, &statement, NULL);
checkForErrors(retvalue);
{
if (!intBindings.isEmpty()) {
QMap<QString, int>::iterator it = intBindings.begin();
QMap<QString, int>::iterator end = intBindings.end();
for ( ; it != end; it++) {
......@@ -66,7 +67,7 @@ SQLiteResource SQLiteConnection::query(QString q)
intBindings.clear();
}
{
if (!stringBindings.isEmpty()) {
QMap<QString, QString>::iterator it = stringBindings.begin();
QMap<QString, QString>::iterator end = stringBindings.end();
for ( ; it != end; it++) {
......
......@@ -958,9 +958,10 @@ int QueryPerformer::insertDelta(SQLiteConnection& dbConnection, Akabei::Delta co
dbConnection.bind(":VersionFrom", QString::fromAscii(delta->versionFrom()));
dbConnection.bind(":VersionTo", QString::fromAscii(delta->versionTo()));
dbConnection.bind(":MD5SUM", QString::fromAscii(delta->md5sum()));
dbConnection.query(QString("INSERT INTO delta (`package`, `filename`, `versionfrom`, `versionto`, `md5sum`) "
dbConnection.query(QString("INSERT INTO deltas (`package`, `filename`, `versionfrom`, `versionto`, `md5sum`) "
"VALUES (:Package, :Filename, :VersionFrom, :VersionTo, :MD5SUM);"));
} catch (SQLiteException& ex) {
qDebug() << "Inserting delta failed with error:" << ex.what();
return SQLITE_ABORT;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment