Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
4.7.1
-
None
Description
In qsql_sqlite.cpp, inside the method QSQLiteResult::exec(), there is a switch (value.type()) that binds the values to the query according to their type.
There is no specific case for QVariant::Bool, so it gets caught by default case, and is converted to a string. As a result, boolean values are stored as strings ("true" or "false") in the sqlite database, whereas SQLite's documentation recommends using integers 0 and 1(http://www.sqlite.org/datatype3.html#boolean)
It would be way more efficient, for performance and storage, to have them as integers.