On Sat, May 5, 2018 at 1:19 PM, J Decker <[email protected]> wrote:
> https://www.sqlite.org/c3ref/column_blob.html
>
> The sqlite3_column_type() routine returns the datatype code
>
Column api is not suitable for me since it relies on the actual data
provided, but I'm the one who calls sqlite3_result_* to provide this.
>
> PRAGMA table_info(table1);
>
The pragma just returns the type part as it was provided by the virtual
table module with schema data. No conversion or mapping is made. But it
will help be to extract the type part correctly if the provided list
comments for example .
[FieldA] /*This is fieldA */ TEXT, [FieldB] FLOAT....
Something also came up as a solution during the reading of this post. The
query
Select typeof(cast('' as <type>))
doesn't require any table so I just can replace <type> with a provided
column type and get the best affinity.
But for any unrecognized it will return "integer", but I'd rather have
"text".
Max
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users