SQLite Forum

SQLite3 shell doing math operation on parameter substitution
Login
> To my mind, it would be a lot better to have a set_val or some variant that one could call that would skip the attempt to use VALUES(%Q,%s); and just use the VALUES(%Q,%Q) path.

If there was such a variant, its name should be set_text_value because that is all it could ever do. The first code path ( VALUES(%Q,%s) ) allows values of any type to be placed into the temp.sqlite_parameters table.

> It'd still be a bit of a surprise for people that use set without understanding what it's doing, but at least there'd be a way to be explicit about what interactions with the shell here.

I have taken an action item to make more explicit how values get into the temp.sqlite_parameters table via .parameter set. We strive to avoid surprising or mystifying those who read the docs.