Problem
FetchRecordsQuery::GetColumnValue (src/queries.cc) returns L"" for both SQLITE_NULL and an empty TEXT value. FetchRecordsQuery::Hydrate then does:
if (content.empty()) {
continue; // leaves the member at its default-constructed value
}
Impact
- A column that is SQL
NULL and a column that holds an empty string are treated identically.
- Any empty/NULL value is silently dropped — the corresponding member keeps its default value rather than being explicitly set, so the model cannot reflect what is actually stored.
This conflation also blocks a clean implementation of nullable fields (#2), which needs to distinguish "absent" from "empty/zero".
Suggested direction
Detect SQLITE_NULL explicitly (sqlite3_column_type) and represent it distinctly from an empty value; stop skipping empty content so an empty string is faithfully assigned. Coordinate with the nullable-fields work in #2.
Problem
FetchRecordsQuery::GetColumnValue(src/queries.cc) returnsL""for bothSQLITE_NULLand an emptyTEXTvalue.FetchRecordsQuery::Hydratethen does:Impact
NULLand a column that holds an empty string are treated identically.This conflation also blocks a clean implementation of nullable fields (#2), which needs to distinguish "absent" from "empty/zero".
Suggested direction
Detect
SQLITE_NULLexplicitly (sqlite3_column_type) and represent it distinctly from an empty value; stop skipping empty content so an empty string is faithfully assigned. Coordinate with the nullable-fields work in #2.