[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kmail-nommap
From:       Jaroslaw Staniek <js () iidea ! pl>
Date:       2008-04-30 22:20:40
Message-ID: 1209594040.474232.18635.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 802868 by staniek:

Add relatively stable and working implementation of SQLite-based storage for KMail \
indices 


*we call the new implementation '''SQLite mode''' for short
*SQLite 3.5.4 is used, as provided by emerge sqlite module; we should not allow using \
                much older versions of sqlite, e.g. 3.1 because of file format \
                differences
*we are using '''one''' .index.db file per account, not folder (NOTE: currently \
                that's per folder...)
*kmailprivate links to sqlite library for SQLite mode, and KMAIL_SQLITE_INDEX is \
                defined to enable #ifdef'd code
*kmfolderindex_sqlite.cpp is created and edited as a copy of kmfolderindex.cpp; \
kmfolderindex.cpp #includes kmfolderindex_sqlite.cpp for SQLite mode and then skips \
                its own code completely
*kmfolderindex_common.cpp is always included by kmfolderindex.cpp; implements \
                KMFolderIndex::openInternal() and KMFolderIndex::createInternal()
*kmfolderindex.h is a common header for both kmfolderindex*.cpp implementations

==KMFolderIndex==
**mIndexId unused - removed as well as serialIndexId()
**indexLocation(): added .db suffix to indicate the index is sqlite-based, \
implementation moved to FolderStorage (before FolderStorage only had it as abstract \
                method)
**INDEX_VERSION is written and checked using 'PRAGMA user_version = <integer>' \
                command [http://sqlite.org/pragma.html]
**we do not use temporary filenames, e.g. in writeIndex(): SQLite takes care about \
                safe storage
**updateIndex(): no changes, we're changing implementation of \
                KMMsgBase::syncIndexString() and writeIndex() instead
*added openDatabase( int mode ) for SQLite mode
*readIndex() implemented for SQLite mode - uses SELECT command on messages table
*readIndexHeader() uses "PRAGMA user_version" sqlite command
*writeIndex() implemented for SQLite mode - uses INSERT command on messages table, \
                within transaction
*common code from {KMFolderMbox|KMFolderMaildir}::open( const char * ) moved to \
                KMFolderIndex::openInternal()
*common code from {KMFolderMbox|KMFolderMaildir}::create() moved to \
KMFolderIndex::createInternal()

==FolderStorage==
*as implementation of KMFolderIndex::indexLocation() is moved to FolderStorage \
(before FolderStorage only had it as abstract method); FolderStorage::idsLocation() \
and FolderStorage::sortedLocation() are added to avoid performing the math like \
                ''mFolder->indexLocation() + ".sorted"''
*added QString location(const QString& suffix) - returns full path to .index, .ids or \
.sorted file (depending on the suffix)

==KMMsgBase==
**added char* mData for SQLite mode only (and a getter/setter)
**getStringPart() and getLongPart() share code between modes now: only cosmetic \
changes applied

==KMFolderDir==
*reload(): skip *.index.db files




 M  +9 -7      CMakeLists.txt  
 M  +32 -7     folderstorage.cpp  
 M  +10 -1     folderstorage.h  
 M  +10 -0     kmfolder.cpp  
 M  +7 -1      kmfolder.h  
 M  +2 -2      kmfolderdir.cpp  
 M  +49 -76    kmfolderindex.cpp  
 M  +21 -4     kmfolderindex.h  
 M  +225 -219  kmfolderindex_sqlite.cpp  
 M  +47 -50    kmfoldermaildir.cpp  
 M  +76 -45    kmfoldermbox.cpp  
 M  +1 -10     kmfoldersearch.cpp  
 M  +2 -2      kmheaders.cpp  
 M  +1 -1      kmheaders.h  
 M  +56 -40    kmmsgbase.cpp  
 M  +11 -0     kmmsgbase.h  
 M  +1 -1      kmmsgdict.cpp  
 M  +12 -0     kmmsginfo.cpp  
 M  +4 -0      kmmsginfo.h  


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic