On 14 Feb 2012, at 6:48pm, Marc L. Allen wrote:

> Does the data type start at being the same as the column affinity in the 
> underlying table and then adjust if the actual data isn't of that type?

<http://www.sqlite.org/datatype3.html>

section 2.3 gives examples of what happens.  But an overriding rule is about 
losing data.  So SQLite might try turning a string into an integer, then back 
to a string again.  If it gets the same string back, then storing it as an 
integer didn't lose any data, so it'll do that.  Bad example, but I hope it 
helps.

> And, if I don't know the underlying table structure, I am guessing that I 
> should always treat INTEGER as a potential int64?

Use sqlite3_column_int64() or sqlite3_column_int() from

<http://www.sqlite.org/c3ref/column_blob.html>

whichever suits you, yielding different sized integers.

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

Reply via email to