I need to store NaNs in my database and able to retrieve them as well.

Since sqlite will give me back 0.0 when I call sqlite3_column_double
and a result contains a NAN,
I was wondering what the best way is to retrieve a NAN from the database.

Here's what I currently do in peudo code:

if (sqlite3_column_type(column)==SQLITE_FLOAT)
   value = sqlite3_column_double(column);
else
   value = NAN;

Now, the doc says that

"The value returned by sqlite3_column_type() is only meaningful if no
type conversions have occurred as described below."

Am I correctly assuming the "no type conversions have occurred"  means
"no type conversions on that (row,column) of the result set"? I mean
next time I call sqlite3_column_type() on the same column but on the
next row of the result set, it will still give the correct answer?

Thanks,

Sander







-- 
"And any fool knows a dog needs a home
A shelter from pigs on the wing"
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to