Reputation: 1127
I have a table with a few rows. The datatypes are not set in the table structure and some rows are integers while some are BLOBs.
How would I figure out what's what? I'm using the C API.
sqlite3_column_type
gives me the same datatype for all rows, which isn't correct.
Upvotes: 0
Views: 353
Reputation: 76256
sqlite3_column_type
is the function that gives you the actual type of the data.sqlite3_column_*
functions, sqlite converts the data it has and the type changes to reflect that. Ask for types before doing anything else with the row.typeof
SQL function (the sqlite3_column_type
C function and typeof
SQL function should always return the same value).Upvotes: 1