[Interest] Qt Sql BLOB data converting
scott at towel42.com
Mon Nov 28 20:31:56 CET 2022
From: Interest <interest-bounces at qt-project.org> On Behalf Of Thiago Macieira
Sent: Monday, November 28, 2022 11:21 AM
To: interest at qt-project.org
Subject: Re: [Interest] Qt Sql BLOB data converting
On Monday, 28 November 2022 10:59:47 PST Christian Ehrlicher wrote:
> It's because of the dynamic typing feature of sqlite (
> https://www.sqlite.org/flextypegood.html ) - even a column is created
> as one type it can contain another one. Looks like the data was
> inserted with the wrong type information since your blob data is for
> sure no readable string.
Thanks for the explanation, Christian. I can confirm that the type comes out correctly if it is inserted into the table AS blob, not as plaintext.
Therefore, the problem is on the insertion side, not in the SELECT or QtSql.
I've closed the task.
I disagree with closing it.
When the cache is being created, it should use the same method for determining the type of a column as the record function does.
First check the name of the column type, then use the enumerated type if the string name is empty.
More information about the Interest