Akonadi

querycache.h
1 /*
2  SPDX-FileCopyrightText: 2012 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 
7 #pragma once
8 
9 #include <optional>
10 
11 class QString;
12 class QSqlQuery;
13 
14 namespace Akonadi
15 {
16 namespace Server
17 {
18 /**
19  * A per-thread cache (should be per session, but that'S the same for us) prepared
20  * query cache.
21  */
22 namespace QueryCache
23 {
24 /// Returns the cached (and prepared) query for @p queryStatement
25 std::optional<QSqlQuery> query(const QString &queryStatement);
26 
27 /// Insert @p query into the cache for @p queryStatement.
28 void insert(const QString &queryStatement, const QSqlQuery &query);
29 
30 /// Clears all queries from current thread
31 void clear();
32 
33 } // namespace QueryCache
34 
35 } // namespace Server
36 } // namespace Akonadi
37 
std::optional< QSqlQuery > query(const QString &queryStatement)
Returns the cached (and prepared) query for queryStatement.
Definition: querycache.cpp:95
void insert(const QString &queryStatement, const QSqlQuery &query)
Insert query into the cache for queryStatement.
Definition: querycache.cpp:100
void clear()
Clears all queries from current thread.
Definition: querycache.cpp:107
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jun 27 2022 04:01:07 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.