Akonadi

schematypes.h
1 /***************************************************************************
2  * Copyright (C) 2006 by Tobias Koenig <[email protected]> *
3  * Copyright (C) 2013 by Volker Krause <[email protected]> *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU Library General Public License as *
7  * published by the Free Software Foundation; either version 2 of the *
8  * License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU Library General Public *
16  * License along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 
21 #ifndef SCHEMATYPES_H
22 #define SCHEMATYPES_H
23 
24 #include <QMap>
25 #include <QString>
26 #include <QStringList>
27 #include <QVector>
28 
29 namespace Akonadi
30 {
31 namespace Server
32 {
33 
38 {
39 public:
41 
42  enum ReferentialAction {
43  Cascade,
44  Restrict,
45  SetNull
46  };
47 
48  QString name;
49  QString type;
50  int size;
51  bool allowNull;
52  bool isAutoIncrement;
53  bool isPrimaryKey;
54  bool isUnique;
55  bool isEnum;
56  QString refTable;
57  QString refColumn;
58  QString defaultValue;
59  ReferentialAction onUpdate;
60  ReferentialAction onDelete;
61  bool noUpdate;
62 
63  QMap<QString, int> enumValueMap;
64 };
65 
70 {
71 public:
73 
74  QString name;
75  QStringList columns;
76  bool isUnique;
77  QString sort;
78 };
79 
84 {
85 public:
87 
92 };
93 
98 {
99 public:
101  int primaryKeyColumnCount() const;
102 
103  QString name;
107 };
108 
113 {
114 public:
116 
117  QString firstTable;
118  QString firstColumn;
119  QString secondTable;
120  QString secondColumn;
122 };
123 
128 {
129 public:
130  explicit RelationTableDescription(const RelationDescription &relation);
131 };
132 
133 } // namespace Server
134 } // namespace Akonadi
135 
136 #endif
A helper class that describes the predefined data of a table for the DbInitializer.
Definition: schematypes.h:83
A helper class that describes indexes of a table for the DbInitializer.
Definition: schematypes.h:69
A helper class that describes a table for the DbInitializer.
Definition: schematypes.h:97
TableDescription constructed based on RelationDescription.
Definition: schematypes.h:127
A helper class that describes a column of a table for the DbInitializer.
Definition: schematypes.h:37
QMap< QString, QString > data
Key contains the column name, value the data.
Definition: schematypes.h:91
A helper class that describes the relation between two tables for the DbInitializer.
Definition: schematypes.h:112
Definition: item.h:44
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jul 1 2020 23:14:22 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.