Simon Slavin <slav...@bigfraud.org> wrote:
> On 9 Sep 2010, at 12:01am, Igor Tandetnik wrote:
> 
>> sqlite3_column_type returns the type of the value in the given column and 
>> the current row. The type reported by
>> sqlite3_column_type may change from row to row. It is largely unrelated to 
>> the type "you originally intended the column to be"
>> (SQLite doesn't really have such a concept; column affinity comes closest, 
>> but there's no API to report it, directly).  
> 
> Hmm.  What would happen if you wrote a row with '1.1' for every value, then 
> used sqlite3_column_type when you read it back out ? 
> Assuming that it was possible (i.e. no TRIGGER or UNIQUE prevented it). 

It depends. If you meant those apostrophes literally, you would get 
SQLITE_TEXT. If you meant to insert 1.1 without apostrophes, that would be 
SQLITE_FLOAT. However, it is possible that the value got coerced to some other 
type upon insertion, due to column affinity. I guess I don't quite understand 
the question.
-- 
Igor Tandetnik


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to