If you get the latest check-in (https://www.sqlite.org/src/info/trunk)
there is a new option on the "sqlite3" command called "-unsetnull 1"
which causes "db eval" to work as you desire - by unsetting the array
elements for NULL values.  This option is off by default for legacy
compatibility.

On 6/26/17, Peter da Silva <peter.dasi...@flightaware.com> wrote:
> On 6/26/17, 9:00 AM, "sqlite-users on behalf of Richard Hipp"
> <sqlite-users-boun...@mailinglists.sqlite.org on behalf of d...@sqlite.org>
> wrote:
>> 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.
>
> That’s what I’d call an “in-band” solution. It’s got problems when writing
> code that needs to generalize to unknown datasets...
>
> Also, does `db nullvalue` return the current null value, or would you need
> to track that externally? The documentation doesn’t say, but let’s see...
>
> % test nullvalue {\N}
> \N
> % test nullvalue
> \N
>
> So that’s workable if you know you have a guaranteed unique token-string you
> can use. Also, may want to update https://sqlite.org/tclsqlite.html to note
> that.
>
> Anyway, I ran into this testing my sqlite3 bridge for Pgtcl. It doesn’t seem
> like it would be hard to implement a clone of `$db select` that will do what
> I want, but it would be nice to have a standard binding.
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
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

Reply via email to