[Kde-pim] [patch] smale patch for server/src/storage/dbinitializer.cpp (pSQL-support and some mysql-stuff)
Jaros?aw Staniek
js at iidea.pl
Fri Mar 28 22:07:21 GMT 2008
Tony Wolf said the following, On 2008-03-28 22:47:
> Hi everybody,
>
> I've done my second patch on
> akonadi/server/src/storage/dbinitializer.cpp. It provides some chances
> for PSQL support as requested on [1].
>
[..]
> @@ -308,7 +308,9 @@
> if ( type == QLatin1String("QString") )
> return QLatin1String("TEXT");
> if (type == QLatin1String("QByteArray") )
> - return QLatin1String("LONGBLOB");
> + return ( mDatabase.driverName() == QLatin1String("QPSQL") )
> + ? QLatin1String("BYTEA")
> + : QLatin1String("LONGBLOB");
> if ( type == QLatin1String("QDateTime") )
> return QLatin1String("TIMESTAMP");
> if ( type == QLatin1String( "bool" ) )
Oh, BTW: that reminds me days of Kexi ~0.1 in 2003.
Is that very large work move all the conditions like
mDatabase.driverName() == QLatin1String("QPSQL")
to helper classes? Example:
DriverInfo info("QPSQL");
[..]
//and use:
QString nativeTypeName = info.typeName("BLOB"); ?
instead of
> + return ( mDatabase.driverName() == QLatin1String("QPSQL") )
> + ? QLatin1String("BYTEA")
> + : QLatin1String("LONGBLOB");
Just a note, for now the conditions are not very frequent though,
but later - who knows?
--
regards / pozdrawiam, Jaroslaw Staniek
Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
Kexi & KOffice (http://www.kexi.pl/en, http://www.koffice.org/kexi)
KDE Libraries for MS Windows (http://windows.kde.org)
_______________________________________________
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