sqlite in kdelibs

Harald Fernengel harry at kdevelop.org
Fri Jan 21 15:55:13 GMT 2005


Mike Richardson wrote:
>>This is insane.  Why the heck do we need SQLite in KDE libs when its built
>>in to Qt SQL?  
> Based on my experience with Rekall, and haveing looked at the Qt SQL classes 
> (unless they have been radically extended) then if you are writing a specific 
> purpose app that *knows* what sort of database server it is talking to, then 
> the Qt SQL classes are probably fine.
> But if you want to write anything more generic (either, a general purpose app 
> like Kexi or Rekall; or an app that can be reasonably database server 
> independent) then the Qt SQL classes are pretty well useless, since they do 
> not expose anything like enough information about the database server.
> As an exercise: try to write an app using the Qt SQL classes which can insert 
> a row into a table and then retrieve the server-generated primary key for 
> that row, without coding any knowledge about, or tests for, what database 
> server the app is talking to.

QSqlQuery::lastInsertId() should do the trick in Qt 4.

I don't see any reasons why Kexi would need an own database access layer 
instead of building on top of the Qt SQL module. Please CC harald at 
trolltech com if you think that I am mistaken.

Best regards,

More information about the kde-core-devel mailing list