Akonadi::Server::CollectionQueryHelper
Functions | |
bool | canBeMovedTo (const Collection &collection, const Collection &parent) |
bool | hasAllowedName (const Collection &collection, const QString &name, Collection::Id parent) |
void | remoteIdToQuery (const QStringList &rids, const CommandContext &context, QueryBuilder &qb) |
Collection | resolveHierarchicalRID (const QList< Scope::HRID > &hridChain, Resource::Id resId) |
void | scopeToQuery (const Scope &scope, const CommandContext &context, QueryBuilder &qb) |
Collection | singleCollectionFromScope (const Scope &scope, const CommandContext &context) |
Detailed Description
Helper methods to generate WHERE clauses for collection queries based on a Scope object.
Function Documentation
◆ canBeMovedTo()
bool Akonadi::Server::CollectionQueryHelper::canBeMovedTo | ( | const Collection & | collection, |
const Collection & | parent | ||
) |
Checks if a collection could be moved from its current parent into the given one.
Definition at line 73 of file collectionqueryhelper.cpp.
◆ hasAllowedName()
bool Akonadi::Server::CollectionQueryHelper::hasAllowedName | ( | const Collection & | collection, |
const QString & | name, | ||
Collection::Id | parent | ||
) |
Checks if a collection could exist in the given parent folder with the given name.
Definition at line 53 of file collectionqueryhelper.cpp.
◆ remoteIdToQuery()
void Akonadi::Server::CollectionQueryHelper::remoteIdToQuery | ( | const QStringList & | rids, |
const CommandContext & | context, | ||
QueryBuilder & | qb | ||
) |
Add conditions to qb
for the given remote identifier rid
.
The rid context is taken from context
.
Definition at line 20 of file collectionqueryhelper.cpp.
◆ resolveHierarchicalRID()
Collection Akonadi::Server::CollectionQueryHelper::resolveHierarchicalRID | ( | const QList< Scope::HRID > & | hridChain, |
Resource::Id | resId | ||
) |
Retrieve the collection referred to by the given hierarchical RID chain.
Definition at line 90 of file collectionqueryhelper.cpp.
◆ scopeToQuery()
void Akonadi::Server::CollectionQueryHelper::scopeToQuery | ( | const Scope & | scope, |
const CommandContext & | context, | ||
QueryBuilder & | qb | ||
) |
Add conditions to qb
for the given collection operation scope scope
.
The rid context is taken from context
, if none is specified an exception is thrown.
Definition at line 33 of file collectionqueryhelper.cpp.
◆ singleCollectionFromScope()
Collection Akonadi::Server::CollectionQueryHelper::singleCollectionFromScope | ( | const Scope & | scope, |
const CommandContext & | context | ||
) |
Returns an existing collection specified by the given scope.
If that does not specify exactly one valid collection, an exception is thrown.
Definition at line 125 of file collectionqueryhelper.cpp.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 29 2023 03:51:16 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.