From kde-pim Tue Apr 04 01:11:07 2006 From: Mark Bucciarelli Date: Tue, 04 Apr 2006 01:11:07 +0000 To: kde-pim Subject: Re: [Kde-pim] Akonadi fetch/list/query/monitor API Message-Id: <20060404011107.GP3984 () rabbit> X-MARC-Message: https://marc.info/?l=kde-pim&m=114411307612775 On Mon, Apr 03, 2006 at 11:08:04AM +0200, Volker Krause wrote: > Hi, > > we currently have a mix of various diffrent ways to access data on the storage > backend: > > uid -> object > uid-list -> object-list > query -> uid-list > nothing -> uid-hash of everything > nothing -> monitor everything > > My not yet committed message stuff also contains: > > query -> object-list > query -> monitor everything which matches the query > > We should unify this ;-) > > I think we only need the last two ways (query -> object-list, query -> > monitor). Except query -> uidlist, all the others are just special cases of > the query based ways. > For query->uid-list I currently don't see a real usecase, there isn't much you > can do just with the uids and doing eg. a listing of a large mail folder by > query -> uid-list, uid-list -> object-list doesn't look like a good idea to > me. > > What do you think? Qt's interfaces are great--I would mimic QSqlDatabase. After you remove the following stuff from QSqlDatabase: - transactions, - indexes, - connect options, - drivers, - network info, - user info, and - isOpen, isValid semantics here's what's left: QSqlDatabase(); QSqlDatabase( const QSqlDatabase &other ); ~QSqlDatabase(); QSqlDatabase & operator= ( const QSqlDatabase &other ); QSqlQuery exec( const QString &query = QString() ) const; QSqlError lastError() const; QSqlRecord record( const QString &tablename ) const; None of the static members looked applicable. What about writing it as a QSQlDriver? That would make it extremely easy for any KDE or plain Qt program to use it. Plus, once it works I would not be surprised if people want to add some of the functionality that is crossed off now. In addition, at the client level, you are really close to getting a Sql backend for free. m _______________________________________________ kde-pim mailing list kde-pim@kde.org https://mail.kde.org/mailman/listinfo/kde-pim kde-pim home page at http://pim.kde.org/