Use null QVariant instead of "ALL" for select limit on psql
authorMichael Marley <michael@michaelmarley.com>
Mon, 1 Sep 2014 22:42:22 +0000 (18:42 -0400)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 14 Sep 2014 20:13:43 +0000 (22:13 +0200)
commit195cee2a4bc0bcccde0806103860f5a0531fe47d
tree4cb8d86f1de75d4cc8f746cba83a12c3dbe22e71
parent400d0334238e14c8b49f10f66bac21b57b354931
Use null QVariant instead of "ALL" for select limit on psql

Using "ALL" as it was before was making PostgreSQL error out when
attempting to return backlog for Quasseldroid when Quasseldroid is
in "Unread messages per chat" mode.  According to
http://www.postgresql.org/docs/9.3/static/queries-limit.html,
LIMIT NULL is the same thing as having no LIMIT at all.  According
to http://qt-project.org/doc/qt-4.8/qsqlquery.html, NULL values
are bound in Qt SQL prepared statements by using a null QVariant.
src/core/postgresqlstorage.cpp