Project

General

Profile

Bug #3446

Wt::Dbo: NaN values of double throw exception for Sqlite

Added by Anonymous about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
07/09/2014
Due date:
% Done:

0%

Estimated time:

Description

When using the Sqlite backend for Wt::Dbo, I get the following error when trying to input NaN values of a double:

exception: Sqlite3: insert into "rowname" ("version", "raw_id", "msg_type", "data_type", "key", "moosmsg_id", "moosmsg_time", "double_value", "string_value", "source", "source_auxiliary", "originating_community") values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?): NOT NULL constraint failed: rowname.double_value

This appears to be because Sqlite treats NaN as NULL, and the double implementation of Wt::Dbo::sql_value_traits sets NOT NULL on the table row. Perhaps Wt::Dbo::sql_value_traits for double should allow NULL and convert them to NaN on read?

Also available in: Atom PDF