[Kde-pim] Review Request 111711: Replace runtime schema parsing with compile-time code generation
Volker Krause
vkrause at kde.org
Fri Jul 26 09:07:43 BST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111711/
-----------------------------------------------------------
Review request for Akonadi.
Description
-------
This removes the not exactly cheap XML DOM parsing for the schema creation, and replaces it with generating the structures returned by the parsing code at compile time. From a functional POV this equivalent, but it gets us half way to removing the dependency on QtXml and it paves the way for more sophisticated schema annotations for compile-time query checking in the future.
Git Log:
No need to compile in the schema XML now.
Get rid of the XML DOM parsing code for the db setup.
Replaced with compile-time generated code now.
Generate schema as classes rather than one single namespace.
This way we can have multiple ones, e.g the real one and the one we use
for unit testing.
Also generate schema description for relation tables.
Generate schema description objects at compile time.
This will replace the run-time parsing of the schema XML.
Mime types and flags are created automatically on demand.
So there's no need to pre-fill the database with some well-known ones.
Move schema data types into their own file.
Diffs
-----
server/CMakeLists.txt a8551a1
server/src/storage/akonadidb.qrc a681294
server/src/storage/akonadidb.xml 4a560ac
server/src/storage/datastore.cpp 138639f
server/src/storage/dbinitializer.h 03f75e7
server/src/storage/dbinitializer.cpp adca112
server/src/storage/dbinitializer_p.h b103690
server/src/storage/dbinitializer_p.cpp b0f0428
server/src/storage/schema-header.xsl PRE-CREATION
server/src/storage/schema-source.xsl PRE-CREATION
server/src/storage/schema.h PRE-CREATION
server/src/storage/schema.xsl PRE-CREATION
server/src/storage/schematypes.h PRE-CREATION
server/src/storage/schematypes.cpp PRE-CREATION
server/tests/unittest/CMakeLists.txt 69740fb
server/tests/unittest/dbinitializertest.cpp 029b8cc
server/tests/unittest/dbinitializertest_data/dbinitializertestdata.qrc 85f37c5
server/tests/unittest/dbinitializertest_data/unittest_schema.xml 501dfd8
Diff: http://git.reviewboard.kde.org/r/111711/diff/
Testing
-------
db setup is covered by unit tests
Thanks,
Volker Krause
_______________________________________________
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