On Thu, 28 Feb 2019 at 11:06, Jose Isaias Cabrera <[email protected]> wrote: > > > > Hi. This is from a newbie, so take it with a grain of salt... :-)
Nahh -- happy to have your thoughts about this. > There is always the DB field declaration of NOT NULL, but, if you are going > to allow a NULL value in that field, then, hmmmm... The difficulty with this is that there are fields in my database that *can* legitimately be NULL under certain circumstances and not NULL in others. So declaring them NOT NULL isn't quite the right filter. What I'm seeking is detection of a NULL value being quietly inserted when the intention was otherwise, just as Tcl would complain if I mis-typed a variable reference. I note that if I were using the C API and did, say, a sqlite3_bind_text call abd mis-typed the name of the second argument, the compiler would complain. Likewise Python, though I believe the error would occur at runtime. /Don > > > From: sqlite-users on behalf of Donald Allen > Sent: Thursday, February 28, 2019 08:35 AM > To: [email protected] > Subject: [sqlite] TCL API: substitution of NULL for non-existent variables > > Is there a way to override the substitution of NULL for non-existent > Tcl variables in a query? I have been bitten by this many times, by > mis-typing the variable name in the query and having the query do the > wrong thing rather than failing outright. I think there ought to be an > option that throws an error in this case (treating the variable as if > it were referenced in a Tcl script), rather than quietly inserting a > NULL. I've looked through the documentation hoping to find some way of > changing this behavior and have not. Hopefully I've missed it. In any > case, I'd be happy to have your suggestions. > > Thanks -- > /Don Allen > _______________________________________________ > sqlite-users mailing list > [email protected] > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

