Warning, /pim/akonadi/src/server/storage/entities-dox.xsl is written in an unsupported language. File is not indexed.
0001 <!-- 0002 SPDX-FileCopyrightText: 2007 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 --> 0006 0007 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 0008 version="1.0"> 0009 <xsl:output method="text" encoding="utf-8"/> 0010 0011 <xsl:template match="/"> 0012 // autogenerated from akonadi.db and entities-dox.xsl 0013 /** 0014 \page akonadi_server_database Database Design 0015 0016 \section akonadi_server_database_layout Database Layout 0017 0018 This is an overview of the database layout of the \ref akonadi_design_storage "storage server". 0019 The schema gets generated by the server using the helper class DbInitializer, based on the 0020 definition found in @c server/src/storage/akonadidb.xml. 0021 0022 \dot 0023 digraph "Akonadi Database Layout" { 0024 graph [rankdir="LR" fontsize="10"] 0025 node [fontsize="10" shape="record" style="filled" fillcolor="lightyellow"] 0026 edge [fontsize="10"] 0027 0028 <xsl:for-each select="database/table"> 0029 <xsl:value-of select="@name"/>[label="<1><xsl:value-of select="@name"/><xsl:for-each select="column">|<<xsl:value-of select="@name"/>><xsl:value-of select="@name"/></xsl:for-each>" URL="classAkonadi_1_1<xsl:value-of select="@name"/>.html"]; 0030 0031 <xsl:for-each select="column[@refTable != '']"> 0032 <xsl:value-of select="../@name"/>:<xsl:value-of select="@name"/> -> <xsl:value-of select="@refTable"/>:<xsl:value-of select="@refColumn"/>[label="n:1"]; 0033 </xsl:for-each> 0034 0035 </xsl:for-each> 0036 0037 <xsl:for-each select="database/relation"> 0038 <xsl:value-of select="@table1"/>:<xsl:value-of select="@column1"/> -> <xsl:value-of select="@table2"/>:<xsl:value-of select="@column2"/>[label="n:m" arrowtail=normal]; 0039 </xsl:for-each> 0040 } 0041 \enddot 0042 0043 0044 \section akonadi_server_database_codegeneration Code Generation 0045 0046 Code to access the database is generated from @c akonadidb.xml using an XSL stylesheet, @c entities.xsl. 0047 The generated code encapsulates basic database operations, such as retrieving, inserting, updating and 0048 removing records, as well as methods to retrieve related records. They also contain methods to retrieve 0049 table and column names for creating SQL queries in a typo-safe way. 0050 0051 The following classes are generated: 0052 <xsl:for-each select="database/table"> 0053 - Akonadi::Server::<xsl:value-of select="@name"/> 0054 </xsl:for-each> 0055 0056 For the helper tables used for n:m relations, the following classes are generated. They are only useful 0057 when creating SQL queries that handle the n:m relations manually. 0058 <xsl:for-each select="database/relation"> 0059 - Akonadi::Server::<xsl:value-of select="@table1"/><xsl:value-of select="@table2"/>Relation</xsl:for-each> 0060 0061 */ 0062 </xsl:template> 0063 0064 </xsl:stylesheet> 0065