Changeset View
Changeset View
Standalone View
Standalone View
src/server/handler/list.cpp
Show First 20 Lines • Show All 439 Lines • ▼ Show 20 Line(s) | 246 | { | |||
---|---|---|---|---|---|
440 | if (!mAncestorAttributes.isEmpty()) { | 440 | if (!mAncestorAttributes.isEmpty()) { | ||
441 | retrieveAttributes(ancestorIds); | 441 | retrieveAttributes(ancestorIds); | ||
442 | } | 442 | } | ||
443 | 443 | | |||
444 | //We are querying in batches because something can't handle WHERE IN queries with sets larger than 999 | 444 | //We are querying in batches because something can't handle WHERE IN queries with sets larger than 999 | ||
445 | const int querySizeLimit = 999; | 445 | const int querySizeLimit = 999; | ||
446 | int mimetypeQueryStart = 0; | 446 | int mimetypeQueryStart = 0; | ||
447 | int attributeQueryStart = 0; | 447 | int attributeQueryStart = 0; | ||
448 | QSqlQuery mimeTypeQuery; | 448 | QSqlQuery mimeTypeQuery(DataStore::self()->database()); | ||
449 | QSqlQuery attributeQuery; | 449 | QSqlQuery attributeQuery(DataStore::self()->database()); | ||
450 | auto it = mCollections.begin(); | 450 | auto it = mCollections.begin(); | ||
451 | while (it != mCollections.end()) { | 451 | while (it != mCollections.end()) { | ||
452 | const Collection col = it.value(); | 452 | const Collection col = it.value(); | ||
453 | // qCDebug(AKONADISERVER_LOG) << "col " << col.id(); | 453 | // qCDebug(AKONADISERVER_LOG) << "col " << col.id(); | ||
454 | 454 | | |||
455 | QStringList mimeTypes; | 455 | QStringList mimeTypes; | ||
456 | { | 456 | { | ||
457 | //Get new query if necessary | 457 | //Get new query if necessary | ||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |