diff --git a/src/server/storage/akonadidb.xml b/src/server/storage/akonadidb.xml index e8350c1b0..c5791d05e 100644 --- a/src/server/storage/akonadidb.xml +++ b/src/server/storage/akonadidb.xml @@ -1,248 +1,248 @@ Contains the schema version of the database. - +
This meta data is stored inside akonadi to provide fast access.
create/modified time read access time Indicates that this item has unsaved changes.
This meta data is stored inside akonadi to provide fast access.
Table containing item part types. Part name, without namespace. Part namespace.
- +
Specifies allowed MimeType for a Collection Used to associate items with search folders.
diff --git a/src/server/storage/entities.xsl b/src/server/storage/entities.xsl index d56e93ced..803a46cc6 100644 --- a/src/server/storage/entities.xsl +++ b/src/server/storage/entities.xsl @@ -1,272 +1,272 @@ header /* * This is an auto-generated file. * Do not edit! All changes made to it will be lost. */ #ifndef AKONADI_ENTITIES_H #define AKONADI_ENTITIES_H #include "storage/entity.h" #include <private/tristate_p.h> #include <QtCore/QDebug> #include <QtCore/QSharedDataPointer> #include <QtCore/QString> #include <QtCore/QVariant> template <typename T> class QVector; class QSqlQuery; class QStringList; namespace Akonadi { namespace Server { // forward declaration for table classes class ; // forward declaration for relation classes class Relation; /** Returns a list of all table names. */ QVector<QString> allDatabaseTables(); } // namespace Server } // namespace Akonadi Q_DECLARE_TYPEINFO( Akonadi::Server::, Q_MOVABLE_TYPE ); #endif #include <entities.h> #include <storage/datastore.h> #include <storage/selectquerybuilder.h> #include <utils.h> #include <akonadiserver_debug.h> #include <qsqldatabase.h> #include <qsqlquery.h> #include <qsqlerror.h> #include <qsqldriver.h> #include <qvariant.h> #include <QtCore/QHash> #include <QtCore/QMutex> #include <QtCore/QThread> using namespace Akonadi; using namespace Akonadi::Server; static QStringList removeEntry(QStringList list, const QString& entry) { list.removeOne(entry); return list; } QVector<QString> Akonadi::Server::allDatabaseTables() { static const QVector<QString> allTables = QVector<QString>() << QStringLiteral( "Table" ) << QStringLiteral( "Relation" ) ; return allTables; } :: const & set( ) , if ( Private::cacheEnabled ) { QMutexLocker lock(&Private::cacheMutex); QHash<, >::const_iterator it = Private::.constFind(); if ( it != Private::.constEnd() ) { return it.value(); } } QSqlDatabase db = DataStore::self()->database(); if ( !db.isOpen() ) return (); QueryBuilder qb( tableName(), QueryBuilder::Select ); static const QStringList columns = removeEntry(columnNames(), Column()); qb.addColumns( columns ); qb.addValueCondition( Column(), Query::Equals, ); qb.addValueCondition( Column(), Query::Equals, ); if ( !qb.exec() ) { qCWarning(AKONADISERVER_LOG) << "Error during selection of record with " << << "from table" << tableName() << qb.query().lastError().text(); return (); } if ( !qb.query().next() ) { return (); } int valueIndex = 0; const value = ; (qb.query().isNull(valueIndex)) ? - () : + () : Utils::variantToString( qb.query().value( valueIndex ) ) static_cast<>(qb.query().value( valueIndex ).value<int>()) Utils::variantToDateTime(qb.query().value(valueIndex)) qb.query().value( valueIndex ).value<>() ; ++valueIndex; rv( value , ); if ( Private::cacheEnabled ) { Private::addToCache( rv ); } return rv;