[Kommander-devel] Qt Database plugin almost done... a few things to solve

Eric Laffoon eric at kdewebdev.org
Thu Apr 3 05:18:07 EDT 2008


Hi all,
The Qt database connection is nearly done and ready for final test. Next I 
will finish installing KDE4 and begin testing there, then begin working on 
the KDE4 editor. The following are the known issues with the plugin, which is 
available in the usual place in SVN. There are a few questions too.

First, it's not a complete drop in replacement. Connect really needed to be 
done differently. I could have made it take more steps, but why? You have to 
supply the database when you open a connection. Then again if I could figure 
out how to make it not crash if you try to run a query before connection. 
Actually I'm sure I could do a hack, but I'm looking for the elegant 
solution.

The new driver can't list available databases for a connection. Also I can't 
seem to make sense of the field type. It returns an integer, and it looks 
like it may be the enum{} of QVariant types... Handy if you're writing C++ 
but fairly useless if you're working with databases, at least in my opinion. 

There's lots of new stuff, but one bug cropped up again, the debug output can 
be killed, I think when it's fed a null value or something. Anyway, the only 
problem I see right now is is that it returns "true" and "false" for boolean 
values. That would be okay if Kommander didn't insist on only receiving type 
QString. While QVariant ought to work, I'm afraid of how much work it would 
be to change and debug. Anyway I want to get a certified boolean to return 
1/0 so that Kommander will still see it as true if it is.

I think that covers it. I need sleep. Test form attached...
  DB_CONNECT, //port functions
  DB_QUERY,
  DB_ACTIONQUERY,
  DB_COLUMNS,
  DB_COLUMNCOUNT,
  DB_COLUMNTYPE,
  DB_DATABASES,
  DB_TABLES,
//  DB_drivers,  //new functions
  DB_ListDrivers,
  DB_DriverAvailable,
  DB_Views,
  DB_LastError,
  DB_FieldValue, //(i)
  DB_LastQuery,
  DB_RowsAffected,
  DB_Next,
  DB_Prev,
  DB_First,
  DB_Last,
  DB_At,
  DB_Transaction,
  DB_Commit,
  DB_Rollback,

-- 
Eric Laffoon
Project Lead - kdewebdev module
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newdrivertest.kmdr
Type: application/x-kommander
Size: 16485 bytes
Desc: not available
Url : http://mail01.fortunecookiestudios.com/pipermail/kommander-devel/attachments/20080403/7896a1f6/newdrivertest.bin


More information about the Kommander-devel mailing list