Akonadi::Server::QueryCache

Akonadi::Server::QueryCache Namespace Reference

Functions

size_t capacity ()
 
void clear ()
 
void insert (const QSqlDatabase &db, const QString &queryStatement, QSqlQuery query)
 
std::optional< QSqlQueryquery (const QString &queryStatement)
 

Detailed Description

A per-thread cache (should be per session, but that'S the same for us) prepared query cache.

Function Documentation

◆ capacity()

size_t Akonadi::Server::QueryCache::capacity ( )

Returns the per-thread capacityof the query cache.

Definition at line 126 of file querycache.cpp.

◆ clear()

void Akonadi::Server::QueryCache::clear ( )

Clears all queries from current thread.

Definition at line 117 of file querycache.cpp.

◆ insert()

void Akonadi::Server::QueryCache::insert ( const QSqlDatabase & db,
const QString & queryStatement,
QSqlQuery query )

Insert query into the cache for queryStatement.

Definition at line 110 of file querycache.cpp.

◆ query()

std::optional< QSqlQuery > Akonadi::Server::QueryCache::query ( const QString & queryStatement)

Return a cached QSqlQuery for given queryStatement.

If no query is cached for queryStatement, an empty optional is returned. Otherwise the cached query is removed from the cache and must be returned with insert() after use.

Definition at line 105 of file querycache.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:48:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.