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

List:       kde-pim
Subject:    Re: [Kde-pim] [patch] smale patch for
From:       Jaros?aw_Staniek <js () iidea ! pl>
Date:       2008-03-28 22:07:21
Message-ID: 47ED6C19.3050200 () iidea ! pl
[Download RAW message or body]

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@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

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