-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/02/2010 06:52 PM, Andrew Wood wrote:
> Yes but none of those functions return the class that the declared type 
> maps to (SQLITE_TEXT, SQLITE_FLOAT etc), they just return the SQL type 
> as a string, of which there are umpteen possibilities.

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

If you are talking about the functions on that page then you are
incorrect.  They all operate on the current row, and the contents and
types of each column can differ for each row.

sqlite3_column_type() returns an int (effectively an enum) not a string
and says what the underlying type is for that column in this result row.

The other functions let you retrieve the column value as a variety of C
based types.  Typically if the value is SQLITE_FLOAT then you'd use
sqlite3_column_double etc, but you can call any of the routines and they
will convert as appropriate.  For example if the value is SQLITE_FLOAT
and you call sqlite3_column_int then the value will be converted to an
int, sqlite3_column_text will convert it to text etc.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx/rFwACgkQmOOfHg372QRnmACgvZHcWpSk/2YfBZP8Ok/Fh/xr
RUcAoLBIR143KR71X3xqf38NlH07StSP
=esYO
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to