[Kde-pim] akonadi with postgresql (patch)

Javier Goday jgoday at gmail.com
Sun Jun 7 16:18:55 BST 2009


Hi,

i was trying to set akonadi working with postgresql,
i made a patch for it (attached)

to make it work i manually change configuration in
~/.config/akonadi/akonadiserverrc
and creating the database (createuser and createdb ...)
[%General]
Driver=QPSQL
SizeThreshold=4096
ExternalPayload=false

[QPSQL]
Name=akonadi
User=akonadi
Password=akonadi
Options=
StartServer=false

list of changes :
1. Akonadi database description file and schema
(kdesupport/akonadi/server/src/storage/akonadidb.xml and
kdesupport/akonadi/server/src/storage/akonadidb.xsd)
 - New element 'columnproperty' into column, to describe database type
dependent properties
2. Akonadi database storage initializer
(kdesupport/akonadi/server/src/storage/dbinitializer.cpp)
 - When postgresql, create database relations with complete table name
 - Check for database type dependent properties
3. Collection list handler
(kdesupport/akonadi/server/src/handler/aklist.cpp)
 - Get root collections (without parent) with null parent_id instead of 0
4. Entity header (kdesupport/akonadi/server/src/storage/entity.h)
 - Include QSqlRecord header, to manually access recent inserted id when
using postgresql
5. Entity xsl template ( kdesupport/akonadi/server/src/storage/entities.xsl
and entities-source.xsl)
 - extractResult method: check if the value is null before setting it
 - retrieveFiltered method: if using postgresql, when filtering by a
reference column and null value, use 'is null' instead of ' = 0'
 - insert method: - add 'returning id' option when using postgresql to get
the inserted id
                  - not insert 0 or null references values
                  - get the inserted id manually when using postgresql ( i
cannot make DataStore::lastinsertid work )

i don't know if postgresql support is planned or someone is working on it
i will appreciate any comments, to make sure i do not make any mistake
and maybe to continue with it (allowing postgresql configuration too)

Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: akonadi-postgresql.patch
Type: text/x-patch
Size: 16425 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090607/cc37edc2/attachment.bin>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list