[Interest] Qt Sql BLOB data converting

Thiago Macieira thiago.macieira at intel.com
Mon Nov 28 21:20:44 CET 2022

On Monday, 28 November 2022 12:07:22 PST Scott Bloom wrote:
> but if they did a  create XXX as string, insert XXX=123 (integer) and Sqlite
> can return it as a string or an integer, the QVariant should be created
> from an string not an integer.  The same goes if they did a create XXX as
> integer, insert XXX='123'.  QVariant should be created as from an integer
> type, and they can do a toString on the variant if they want.
> My point, dynamic types should follow C++ style "dynamic" typing not
> "everything is a string until proven otherwise" typing of other languages.

I don't agree. Sqlite seems to have made a choice that the type is stored per 
row, but gives you the ability to choose otherwise either at table creation 
time or at selection time. Changing the behaviour right now would remove that 

I don't know if it is surprising or not for unwary people.

But I can tell you that no action will happen because QtSql is right now 
under-maintained and there are no volunteers to understand all the 
implications of such a choice.

Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering

More information about the Interest mailing list