branches/stable/extragear/multimedia/amarok/src

Seb Ruiz ruiz at kde.org
Tue Nov 6 09:47:16 UTC 2007


SVN commit 733429 by seb:

Use "t" and "f" for postgres boolean values. Whilst psql will happily accept any truthy or falsy value as a boolean input, it will return either a 't' or 'f'. This meant that all boolean comparisons returned false when comparing against "true". Fixes forgetful settings for the podcast channels and episodes.
CCMAIL: amarok at kde.org


 M  +2 -2      collectiondb.h  


--- branches/stable/extragear/multimedia/amarok/src/collectiondb.h #733428:733429
@@ -251,8 +251,8 @@
                   string.replace( '\'', "''" );
         }
 
-        QString boolT() const { if (getDbConnectionType() == DbConnection::postgresql) return "true"; else return "1"; }
-        QString boolF() const { if (getDbConnectionType() == DbConnection::postgresql) return "false"; else return "0"; }
+        QString boolT() const { if (getDbConnectionType() == DbConnection::postgresql) return "t"; else return "1"; }
+        QString boolF() const { if (getDbConnectionType() == DbConnection::postgresql) return "f"; else return "0"; }
         //textColumnType should be used for normal strings, which need to be compared
         //either case-sensitively or -insensitively
         QString textColumnType( int length=255 ) const { if ( getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return QString("VARCHAR(%1)").arg(length); }



More information about the Amarok mailing list