SQLite Forum

Proposed JSON enhancements.
Login
I believe you labour under the misaprehension that the "subtype" is stored in the database.  It is not.  SQLite3 only recognizes five storage types:  NULL, BLOB, TEXT, REAL, INTEGER and something called NUMERIC which is a made-up combination of REAL and INTEGER that does not actually exist as a type.

The "subtype" is something that gets "tagged onto a retrieved value" by "a function execution against the value".

Subtype is not persistent.  It must be recalculated every time.  Nor is the subtype associated with anything in particular related to the data value itself.

It is merely a way of tagging a retrieved value.  If you were to take a TEXT item containing JSON and pass it to the Jimbo functions, then it would get a subtype of Jimbo.  Subtype is not an inherent characteristic of a value but is a convenient way to "remember" something about the value **after** it has been processed by a function.