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

Jean-Christophe Deschamps wrote:
> can we rely on testing for the 5  datatypes reliably?

Yes, it will only be one of the 5 types.

> I understand that when the argument comes from a column, then the type 
> returned by sqlite3_value_type() is the column type.  

The function does not return its value based on the column.  It only returns
it based on the sqlite3_value being interrogated.

As an example it is perfectly possible for the first column in each row to
have a different type in a table.  If you called sqlite3_step that just
selected each row then you would get a different return each time.
Similarly if you are using this function for a user defined function
callback then you would get exactly what the types of the parameters are.

> But litterals and
> return values from scalar functions have a well defined type.  Is this 
> defined type what sqlite3_value_type() returns in all such cases?

You seem to be thinking of http://www.sqlite.org/c3ref/column_decltype.html
which is far more woolly.  sqlite3_value_type tells you exactly what the
value being looked at type is.  How that value arose is irrelevant.

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

iEYEARECAAYFAksEjlYACgkQmOOfHg372QSFFwCaAgKR79nnmu5mERflUpFmI7+3
OtcAn13BDcDEfAQ0XeL3V0VCVm0NC8wx
=P/XO
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to