• Skip to content
  • Skip to link menu
Brand

API Documentation

  1. KDE API Reference
  2. KDE PIM
  3. Akonadi
  • KDE Home
  • Contact Us

Quick Links

Skip menu "Akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • Modules
  • Related Pages

Class Picker

About

PIM Storage Framework

Maintainer
Daniel Vrátil
Supported platforms
Linux
Community
IRC: #akonadi on Freenode
Mailing list: kde-pim
Use with CMake
find_package(KF5AkonadiCore)
target_link_libraries(yourapp KF5::AkonadiCore)
Use with QMake
QT += AkonadiCore 
Clone
git clone git://anongit.kde.org/akonadi.git
Browse source
Akonadi on cgit.kde.org

Akonadi

  • kde
  • pim
  • akonadi
  • src
  • server
  • storage
selectquerybuilder.h
1 /*
2  Copyright (c) 2007 Volker Krause <[email protected]>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef AKONADI_SELECTQUERYBUILDER_H
21 #define AKONADI_SELECTQUERYBUILDER_H
22 
23 #include "storage/querybuilder.h"
24 
25 namespace Akonadi
26 {
27 namespace Server
28 {
29 
33 template <typename T> class SelectQueryBuilder : public QueryBuilder
34 {
35 public:
39  inline SelectQueryBuilder()
40  : QueryBuilder(T::tableName(), Select)
41  {
42  addColumns(T::fullColumnNames());
43  }
44 
48  QVector<T> result()
49  {
50  return T::extractResult(query());
51  }
52 };
53 
54 } // namespace Server
55 } // namespace Akonadi
56 
57 #endif
Akonadi::Server::QueryBuilder::query
QSqlQuery & query()
Returns the query, only valid after exec().
Definition: querybuilder.cpp:158
Akonadi::Server::SelectQueryBuilder::result
QVector< T > result()
Returns the result of this SELECT query.
Definition: selectquerybuilder.h:48
Akonadi::Server::SelectQueryBuilder::SelectQueryBuilder
SelectQueryBuilder()
Creates a new query builder.
Definition: selectquerybuilder.h:39
Akonadi::Server::SelectQueryBuilder
Helper class for creating and executing database SELECT queries.
Definition: selectquerybuilder.h:33
QVector
Definition: item.h:44
Akonadi
Akonadi::Server::QueryBuilder::addColumns
void addColumns(const QStringList &cols)
Adds the given columns to a select query.
Definition: querybuilder.cpp:467
Akonadi::Server::QueryBuilder
Helper class to construct arbitrary SQL queries.
Definition: querybuilder.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Mon Dec 9 2019 02:01:49 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal