On 6/26/17, Peter da Silva <peter.dasi...@flightaware.com> wrote: > What’s the best way to handle NULLs out of band when walking the results of > a query: > > $sqlite_db eval “SELECT * FROM table ...” array { > ... > } > > In other Tcl database bindings it’s common to return arrays containing > possible null values with NULL values simply unset, so `[info exists]` can > be used to distinguish nulls from the empty string. For example in Pgtcl you > can specify `pg_select ... -withoutnulls` to omit nulls from returned rows - > I don’t see anything analogous in sqlite3 but it’s possible I’m missing > something.
The "db nullvalue STRING" command lets you translate NULL values into the string value of your choice. But there is not (currently) a way to cause NULL values to unset the corresponding member of the array. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users