Closed tkopets closed 6 years ago
@mtxr For some reason, new pull requests are not submitted to Codacy, but that check is required and I cannot merge all new pull requests. This PR is not listed on Codacy: https://www.codacy.com/app/SQLTools/SQLTools/pullRequests
Can you take a look why do we have problems with Codacy?
The highlight of this PR and the main structural and functional changes include:
options
apply to CLI invocationsbefore
andafter
applied (top level and per-query)execute
named query section which is used when executing statements withST: Execute
and friends (Execute All File, Execute Query from History, etc)This one is a somewhat lengthy pull request, but as you can see it is for a good reason.
Here is a more detailed list of things that got fixed or improved in this PR:
before
andafter
runs on all commands. Make sure thatbefore
and newly introducedafter
sql incli_options
settings is added to each command (if configured on the top level) as well as introduce optional per commandbefore
and "afterwhich are run in addition main
beforeand
after`.options
work. The new concept of applyingoptions
is: top-leveloptions
are applied to all CLI invocations (all queries). In addition to top-leveloptions
each named queryoptions
are appended.execute
is introduced, which helps to better control which options are applied when the user executes the query usingST: Execute
orST: Execute All File
.str.format()
, therefore all instances of%s
in template strings got replaced with "{0}", with back-patch support (i.e.%s
should still work for those users who have it on their own user config, which overrides the default one)encoding
supplied in connection settings when writing to standard input and reading from standard output of CLI commandSQLToolsAPI/Connection.py
These RDBMS got some improvements.
before
orafter
sql section the default config (multi-statement SQL) would work just fineNSL_LANG
to match the server encodingutf8
encoding by default when invoking MySQL CLI (which matches the encoding set in default connection config)ST : Explain Plan
Fixes #120