Closed sfc-gh-pbennes closed 1 year ago
Ok, I think this is ready for another review.
Ok take a look at this most recent commit. I use types.go's ParseBool for ON_ERROR_STOP as well, which makes it consistent with the set behavior of QUIET. I push the case of \set QUIET
with the empty value being interpreted as "on" in to ParseBool. This simplifies Set() nicely.
Squashed! Was going to ask about documentation as well but you read my mind and answered haha. Thanks @nineinchnick
Docs issue: https://github.com/xo/usql/issues/379
@sfc-gh-pbennes I didn't like the addition of a top level exported func in the env
package that is not used anywhere else. I've cleaned up the logic, and fixed some other superficial errors in the latest commit. Can you please check that this logic still works as you expected? Thanks.
@kenshaw makes sense, thanks for the FYI. Just checked and the logic still works as expected!
Ok, thanks. I'll be tagging and pushing a point release shortly with this.
This PR adds a variable,
ON_ERROR_STOP
, disabled by default to maintain status quo, that allows usql to stop execution in the case where it's being requested to execute multiple statements, either by file input or multiple statements on the command line.Here are some examples:
SQL file execution with file:
-c
:And then a garbage value for the parameter:
Interactive mode: