From 4f59995242d894baa041a8171d420a18b43ceb8c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 18 Jul 2012 12:07:19 +0200 Subject: Convert NULLs to NaNs in SQLite for float and double This makes it consistent with SQLite behavior which converts NaNs to NULLs. --- sqlite/types/driver.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sqlite/types/driver.cxx') diff --git a/sqlite/types/driver.cxx b/sqlite/types/driver.cxx index 0c19e75..1214d18 100644 --- a/sqlite/types/driver.cxx +++ b/sqlite/types/driver.cxx @@ -5,6 +5,7 @@ // Test SQLite type conversion. // +#include // std::numeric_limits #include // std::auto_ptr #include #include @@ -33,6 +34,7 @@ main (int argc, char* argv[]) o.bool_ = true; o.integer_ = -123456; o.real_ = 1.123; + o.nan_ = numeric_limits::quiet_NaN (); string long_str (2040, 'l'); -- cgit v1.1