execsql2 2.22.5__tar.gz → 2.22.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {execsql2-2.22.5 → execsql2-2.22.7}/.github/workflows/ci-cd.yml +8 -8
- {execsql2-2.22.5 → execsql2-2.22.7}/CHANGELOG.md +23 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/PKG-INFO +2 -2
- {execsql2-2.22.5 → execsql2-2.22.7}/README.md +1 -1
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/about/divergence.md +51 -47
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/guides/formatter.md +22 -7
- {execsql2-2.22.5 → execsql2-2.22.7}/pyproject.toml +2 -2
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/format.py +120 -13
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_format.py +356 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/uv.lock +1 -1
- {execsql2-2.22.5 → execsql2-2.22.7}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/.github/dependabot.yml +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/.gitignore +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/.pre-commit-config.yaml +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/.pre-commit-hooks.yaml +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/.python-version +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/.readthedocs.yaml +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/CONTRIBUTING.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/LICENSE.txt +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/NOTICE +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/SECURITY.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/about/contributors.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/about/copyright.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/api/cli.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/api/db.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/api/exporters.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/api/importers.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/api/index.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/api/metacommands.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/dev/adding_db_adapters.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/dev/adding_exporters.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/dev/adding_importers.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/dev/adding_metacommands.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/dev/architecture.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/dev/releasing.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/getting-started/installation.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/getting-started/requirements.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/getting-started/syntax.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/guides/debugging.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/guides/documentation.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/guides/encoding.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/guides/examples.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/guides/logging.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/guides/sql_syntax.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/guides/usage.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/guides/using_scripts.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/Compare_planets.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/actions.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/actions2.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/checkboxes.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/connect.b64 +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/connect.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/create_conf.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/data_error1_screenshot.jpg +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/entry_form.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/execsql_console.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/execsql_logo_01.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/fatals.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/logo_small.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/pause_terminal.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/pause_terminal_sm.b64 +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/pause_terminal_sm.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/prompt_compare.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/set_build_commands.jpg +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/unit_conversions.b64 +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/unit_conversions_029.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/unmatched.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/images/vim_execsql_highlight.png +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/index.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/reference/configuration.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/reference/metacommands.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/reference/security.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/docs/reference/substitution_vars.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/extras/plugin-template/README.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/extras/plugin-template/pyproject.toml +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/extras/plugin-template/src/execsql_plugin_YOURNAME/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/extras/plugin-template/tests/test_plugin.py.example +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/extras/vscode-execsql/README.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/extras/vscode-execsql/package.json +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/extras/vscode-execsql/syntaxes/execsql.tmLanguage.json +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/justfile +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/scripts/benchmarks/README.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/scripts/benchmarks/results/.gitignore +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/scripts/benchmarks/run_benchmarks.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/scripts/generate_vscode_grammar.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/__main__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/api.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/cli/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/cli/dsn.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/cli/help.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/cli/lint.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/cli/run.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/config.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/data/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/data/execsql.conf.template +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/db/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/db/access.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/db/base.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/db/dsn.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/db/duckdb.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/db/factory.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/db/firebird.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/db/mysql.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/db/oracle.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/db/postgres.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/db/sqlite.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/db/sqlserver.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/debug/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/debug/repl.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exceptions.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/base.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/delimited.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/duckdb.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/feather.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/html.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/json.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/latex.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/markdown.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/ods.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/parquet.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/pretty.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/protocol.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/raw.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/sqlite.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/templates.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/values.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/xls.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/xlsx.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/xml.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/yaml.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/exporters/zip.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/gui/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/gui/base.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/gui/console.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/gui/desktop.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/gui/tui.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/importers/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/importers/base.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/importers/csv.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/importers/feather.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/importers/json.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/importers/ods.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/importers/xls.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/conditions.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/connect.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/control.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/data.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/debug.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/dispatch.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/io.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/io_export.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/io_fileops.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/io_import.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/io_write.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/prompt.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/script_ext.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/system.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/metacommands/upsert.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/models.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/parser.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/plugins.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/py.typed +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/script/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/script/ast.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/script/control.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/script/engine.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/script/executor.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/script/parser.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/script/variables.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/state.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/state.pyi +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/types.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/utils/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/utils/auth.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/utils/crypto.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/utils/datetime.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/utils/errors.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/utils/fileio.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/utils/gui.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/utils/mail.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/utils/numeric.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/utils/regex.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/utils/strings.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/src/execsql/utils/timer.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/README.md +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/config_settings.sqlite +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/example_config_prompt.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/make_config_db.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/md_compare.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/md_glossary.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/md_upsert.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/pg_compare.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/pg_glossary.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/pg_upsert.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/script_template.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/ss_compare.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/ss_glossary.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/templates/ss_upsert.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/cli/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/cli/test_cli.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/cli/test_cli_e2e.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/cli/test_cli_run.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/cli/test_lint.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/cli/test_ping.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/cli/test_profile.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/conftest.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_access_windows.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_base.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_db_adapters_mocked.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_db_adapters_mocked_extra.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_dsn.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_duckdb.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_factory.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_mysql_case_folding.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_mysql_inprocess.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_postgres.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_postgres_inprocess.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_sqlite.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_sqlite_extra.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/db/test_sqlserver_inprocess.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_base.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_db.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_delimited.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_duckdb_exporter.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_exporters.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_feather.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_html_extended.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_html_latex.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_json.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_json_extended.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_latex_extended.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_markdown.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_ods.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_ods_export.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_parquet.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_pretty_extended.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_raw_extended.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_sqlite_exporter.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_templates.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_templates_extended.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_values_extended.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_xls_xlsx.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_xlsx.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_xml.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_yaml.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/exporters/test_zip.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/gui/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/gui/test_backends.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/gui/test_backends_extended.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/gui/test_compare_stats.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/gui/test_compute_row_diffs.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/gui/test_desktop_dialogs.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/gui/test_format_table.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/gui/test_tui_pilot.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/gui/test_tui_pilot_complex.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/gui/test_utils_gui_extended.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/importers/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/importers/test_base_extended.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/importers/test_csv_edge_cases.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/importers/test_csv_importer.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/importers/test_feather_importer.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/importers/test_json_importer.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/importers/test_ods_importer.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/importers/test_xls_importer.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/integration/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/integration/conftest.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/integration/test_dsn.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/integration/test_duckdb.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/integration/test_mysql.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/integration/test_postgres.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/integration/test_sqlite.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_assert.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_breakpoint.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_conditions_extra.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_connect.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_io_export.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_io_import.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_metacommands.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_metacommands_connect.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_metacommands_data.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_metacommands_extended.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_metacommands_fileops_extra.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_metacommands_io.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_metacommands_io_write_extra.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_metacommands_script_ext.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_metacommands_system.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_metacommands_system_extra.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_pg_upsert.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_prompt.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_row_count.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/metacommands/test_show_scripts.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/audit_lint_bad.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/audit_smoke/sample.json +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/audit_smoke/sample.jsonl +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/audit_smoke.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/config_runtime.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/control_flow.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/counters_and_locals.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/error_handling.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/import_options/has_comments.csv +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/import_options.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/includes/helper.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/includes.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/io_formats.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/io_roundtrip.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/multi_db.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/parquet_feather_roundtrip.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/parse_only/parse_tree.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/predicates.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/scripts.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/smoke.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/subroutine_loops.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/subvars_advanced.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/template_export/greeting.tmpl +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/template_export.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/timer.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/transactions.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/write_create_table.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/fixtures/xlsx_ods_roundtrip.sql +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/scripts/test_sql_scripts.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/security/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/security/test_env_detection.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/security/test_expansion_bomb.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/security/test_import_regex_hardening.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/security/test_log_redaction.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/security/test_odbc_injection.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/security/test_path_containment.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/security/test_substitution_injection.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/security/test_zip_bomb.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_api.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_api_extended.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_ast.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_ast_parser.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_bundled_templates.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_config.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_config_data.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_config_extended.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_debug_repl.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_engine.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_error_messages.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_exceptions.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_executor.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_executor_inprocess.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_mail.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_models.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_package.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_parser.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_parser_params.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_plugins.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_registry.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_script.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_state.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/test_types.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/__init__.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_auth.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_auth_extra.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_crypto.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_datetime.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_encodedfile_context.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_errors.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_errors_extra.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_fileio.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_fileio_extra.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_numeric.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_regex.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_strings.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_timer.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/tests/utils/test_timer_extra.py +0 -0
- {execsql2-2.22.5 → execsql2-2.22.7}/zensical.toml +0 -0
|
@@ -21,7 +21,7 @@ jobs:
|
|
|
21
21
|
contents: read
|
|
22
22
|
steps:
|
|
23
23
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
24
|
-
- uses: actions/setup-python@
|
|
24
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
25
25
|
with:
|
|
26
26
|
python-version: "3.13"
|
|
27
27
|
- run: python -m pip install ruff
|
|
@@ -35,7 +35,7 @@ jobs:
|
|
|
35
35
|
contents: read
|
|
36
36
|
steps:
|
|
37
37
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
38
|
-
- uses: actions/setup-python@
|
|
38
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
39
39
|
with:
|
|
40
40
|
python-version: "3.13"
|
|
41
41
|
cache: "pip"
|
|
@@ -50,7 +50,7 @@ jobs:
|
|
|
50
50
|
contents: read
|
|
51
51
|
steps:
|
|
52
52
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
53
|
-
- uses: actions/setup-python@
|
|
53
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
54
54
|
with:
|
|
55
55
|
python-version: "3.13"
|
|
56
56
|
cache: "pip"
|
|
@@ -68,7 +68,7 @@ jobs:
|
|
|
68
68
|
contents: read
|
|
69
69
|
steps:
|
|
70
70
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
71
|
-
- uses: actions/setup-python@
|
|
71
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
72
72
|
with:
|
|
73
73
|
python-version: "3.13"
|
|
74
74
|
cache: "pip"
|
|
@@ -99,7 +99,7 @@ jobs:
|
|
|
99
99
|
- name: Check out repository code
|
|
100
100
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
101
101
|
- name: Setup Python ${{ matrix.python-version }}
|
|
102
|
-
uses: actions/setup-python@
|
|
102
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
103
103
|
with:
|
|
104
104
|
python-version: ${{ matrix.python-version }}
|
|
105
105
|
- name: Cache pip dependencies
|
|
@@ -190,7 +190,7 @@ jobs:
|
|
|
190
190
|
- name: Check out repository code
|
|
191
191
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
192
192
|
- name: Setup Python ${{ matrix.python-version }}
|
|
193
|
-
uses: actions/setup-python@
|
|
193
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
194
194
|
with:
|
|
195
195
|
python-version: ${{ matrix.python-version }}
|
|
196
196
|
- name: Install tkinter (Ubuntu)
|
|
@@ -237,7 +237,7 @@ jobs:
|
|
|
237
237
|
contents: read
|
|
238
238
|
steps:
|
|
239
239
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
240
|
-
- uses: actions/setup-python@
|
|
240
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
241
241
|
with:
|
|
242
242
|
python-version: ${{ matrix.python-version }}
|
|
243
243
|
- name: Install Microsoft Access Database Engine 2016 (x64)
|
|
@@ -290,7 +290,7 @@ jobs:
|
|
|
290
290
|
steps:
|
|
291
291
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
292
292
|
- name: Set up Python
|
|
293
|
-
uses: actions/setup-python@
|
|
293
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
294
294
|
with:
|
|
295
295
|
python-version: "3.13"
|
|
296
296
|
cache: "pip"
|
|
@@ -13,6 +13,29 @@ ______________________________________________________________________
|
|
|
13
13
|
|
|
14
14
|
______________________________________________________________________
|
|
15
15
|
|
|
16
|
+
## [2.22.7] - 2026-09-17
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- `execsql-format` no longer deletes clauses from SQL it cannot fully parse. `INSERT ... CROSS JOIN LATERAL (VALUES ...) AS g(a, b) ON CONFLICT (a) DO NOTHING` was rewritten without its `DO NOTHING`, and `--in-place` reported the result as `reformatted`.
|
|
21
|
+
- `execsql-format` no longer deletes a substitution variable that supplies a conditional clause. A `!!~var!!` standing alone in a `WHERE` clause — the pattern the shipped upsert templates use for optional predicates — was dropped from the formatted output, as was a trailing `ORDER BY` in the same statement.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- `execsql-format` leaves a run of SQL untouched when any statement in it fails to parse, instead of reformatting from a partial parse. Affected statements keep their original layout; only their indentation is normalized.
|
|
26
|
+
|
|
27
|
+
______________________________________________________________________
|
|
28
|
+
|
|
29
|
+
## [2.22.6] - 2026-08-28
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- `execsql-format` no longer indents inside a multi-line string literal. A `$$…$$` body or a multi-line `'…'` string inside an `IF`, `LOOP`, or `BEGIN SQL` block had the block's indentation added to each of its lines, changing the value the database stores.
|
|
34
|
+
- `execsql-format --leading-comma` no longer moves a comma into or out of a multi-line string literal, which rewrote the stored value.
|
|
35
|
+
- `execsql-format` now reaches a stable result in one pass. A statement sqlglot could not parse gained a space of indentation on every run and never converged, so `--check` could not pass on an already-formatted file; two adjacent comments on one statement also cost an extra pass.
|
|
36
|
+
|
|
37
|
+
______________________________________________________________________
|
|
38
|
+
|
|
16
39
|
## [2.22.5] - 2026-08-27
|
|
17
40
|
|
|
18
41
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: execsql2
|
|
3
|
-
Version: 2.22.
|
|
3
|
+
Version: 2.22.7
|
|
4
4
|
Summary: Runs a SQL script against a PostgreSQL, SQLite, MariaDB/MySQL, DuckDB, Firebird, MS-Access, MS-SQL-Server, or Oracle database, or an ODBC DSN. Provides metacommands to import and export data, copy data between databases, conditionally execute SQL and metacommands, and dynamically alter SQL and metacommands with substitution variables.
|
|
5
5
|
Project-URL: Homepage, https://execsql2.readthedocs.io
|
|
6
6
|
Project-URL: Repository, https://github.com/geocoug/execsql
|
|
@@ -384,7 +384,7 @@ execsql-format --no-sql --in-place scripts/
|
|
|
384
384
|
```yaml
|
|
385
385
|
repos:
|
|
386
386
|
- repo: https://github.com/geocoug/execsql
|
|
387
|
-
rev: v2.22.
|
|
387
|
+
rev: v2.22.7
|
|
388
388
|
hooks:
|
|
389
389
|
- id: execsql-format
|
|
390
390
|
```
|
|
@@ -272,53 +272,57 @@ These are behavioral changes driven by security or correctness issues in the ups
|
|
|
272
272
|
|
|
273
273
|
### Bug Fixes
|
|
274
274
|
|
|
275
|
-
| Area | Fix
|
|
276
|
-
| ----------------------------------------------------- |
|
|
277
|
-
| Oracle default port | Corrected from `5432` (PostgreSQL) to `1521`.
|
|
278
|
-
| MySQL `LOAD DATA INFILE` encoding | Python encoding names are now mapped to MySQL charset names.
|
|
279
|
-
| `dt_cast` type converters | Base `Database` class auto-populates 8 type converters that were previously left empty after the refactor.
|
|
280
|
-
| `FileWriter` CPU busy-loop | Uses blocking `queue.get(timeout=0.1)` instead of `get_nowait()` in a tight loop.
|
|
281
|
-
| Substitution variable cycles | 100-iteration limit prevents infinite loops on cyclic variable references.
|
|
282
|
-
| Script location in error messages | `ErrInfo.script_file` and `script_line_no` are now populated via `stamp_errinfo()` so error output includes "Line N of script foo.sql" context — restoring behavior present in the monolith.
|
|
283
|
-
| `$ERROR_MESSAGE` not updated | `$ERROR_MESSAGE` is now set on every error path: `exit_now()`, non-halting SQL errors, and non-halting metacommand errors. Previously it was initialized to `""` and never changed.
|
|
284
|
-
| Metacommand error message lost | When `halt_on_metacommand_err` is `ON`, the original handler `ErrInfo` is now re-raised; the generic "Unknown metacommand" message no longer replaces the specific error from the handler.
|
|
285
|
-
| Empty script name in error msg | `_execute_script_direct()` and `_execute_script_textual_console()` no longer append "in script , line 0" to uncaught-exception messages when `current_script_line()` returns an empty string.
|
|
286
|
-
| `PROMPT COMPARE` diff comparison | Diff engine uses native Python equality instead of string comparison — numeric types, Decimals, and booleans compare correctly. `None` is distinguished from empty string. Columns are matched by name (not position), key columns are excluded from comparison, and duplicate PKs keep the first row.
|
|
287
|
-
| `win_config_file` broken | Checked `os.name == "windows"` which Python never returns (correct value is `"nt"`). Fixed to `os.name == "nt"`.
|
|
288
|
-
| ELSEIF + ANDIF/ORIF | ANDIF/ORIF after an ELSEIF were silently attached to the parent IF condition instead of the ELSEIF clause. The compound condition was never evaluated for the ELSEIF branch. Fixed in the AST parser and executor.
|
|
289
|
-
| Cursor leak in `select_rowsource()` | Cursor was not closed on query execution failure. Row generators in EXPORT and COPY paths were not explicitly closed on error, relying on garbage collection for cleanup.
|
|
290
|
-
| `NumericParser` right-associative | Arithmetic operators were parsed right-to-left. `10 - 3 - 2` evaluated as `9` instead of `5`. Fixed to left-associative parsing.
|
|
291
|
-
| Empty-column check precedence | `DataTable` and `Database.populate_table()` had an operator precedence bug in the extra-column emptiness check — a redundant `and conf.del_empty_cols` caused incorrect short-circuit evaluation.
|
|
292
|
-
| SQLite import string processing | `SQLiteDatabase.populate_table()` applied `trim_strings`, `replace_newlines`, and `empty_strings` after copying row data, so processing never reached the INSERT. Fixed to process before extraction.
|
|
293
|
-
| `$CURRENT_DATABASE`/`$CURRENT_DBMS` stale after USE | These variables were only set at startup and on CONNECT, not refreshed when `USE` switched the active database. Now set in `set_static_system_vars()` so they update on any connection change.
|
|
294
|
-
| `DT_Text.data_type_name` wrong | Was `"character"` (same as `DT_Character`), making error messages indistinguishable. Corrected to `"text"`.
|
|
295
|
-
| `DT_Varchar` non-string data unchecked | `_from_data()` only enforced the 255-char limit for `str` inputs; non-string values passed through without conversion or length check.
|
|
296
|
-
| `WriteHooks.write_err()` crash on empty string | `strval[-1]` raised `IndexError` on empty input. Fixed to use `str.endswith()`.
|
|
297
|
-
| `NumericParser` division by zero | `NumericAstNode.eval()` raised unhandled `ZeroDivisionError`. Now raises `NumericParserError` with a clear message.
|
|
298
|
-
| `CondAstNode.eval()` could return `None` | Missing fallthrough for unknown node types silently returned `None`. Now raises `CondParserError`.
|
|
299
|
-
| `DT_Timestamp` claims time-only values | `dateutil.parser.parse()` silently fills in today's date for bare time strings like `"13:15:45"`, so `DT_Timestamp` matched before `DT_Time` in the inference order. `parse_datetime()` now rejects time-only strings.
|
|
300
|
-
| `CounterVars.substitute` skipped pos 0–1 | `re.I` was passed as the positional `pos` argument, skipping the first 2 characters of every string during counter variable expansion. Counter variables at the very start of a line were never matched.
|
|
301
|
-
| `exec_cmd` (SQLite/DuckDB) always raised TypeError | Passed bytes to `curs.execute()` via `.encode()`, which Python 3 `sqlite3`/`duckdb` reject. `EXECUTE PROCEDURE` metacommand was non-functional on these backends.
|
|
302
|
-
| MySQL `LOAD DATA INFILE` injection | File path, delimiter, and quotechar were interpolated without escaping. Now single-quotes are escaped consistent with the PostgreSQL COPY path.
|
|
303
|
-
| Missing server/database name at connect | Connecting to a server-based database without a server or database name now stops with a clear fatal error ("Configured database requires a server name, but none is provided.") instead of crashing inside the driver with a `TypeError`.
|
|
304
|
-
| Config file chain infinite loop | The `config_file` directive could chain config files without limit. A circular reference (via symlinks or different relative paths) caused an infinite loop at startup. Now capped at 20 files.
|
|
305
|
-
| Cursor leaks in database adapters | ~15 methods across all adapters used `curs = self.cursor()` / `curs.close()` without `try/finally`. If the query raised, the cursor leaked. Converted to `with self._cursor() as curs:`.
|
|
306
|
-
| JSON export malformed on special column names | Column names containing `"` or `\` produced invalid JSON. Now uses `json.dumps()` for all field names.
|
|
307
|
-
| Temp file creation TOCTOU race | `TempFileMgr.new_temp_fn()` discarded the `NamedTemporaryFile` handle, creating a race window. Now uses `tempfile.mkstemp()` for secure creation.
|
|
308
|
-
| `shlex.split` on Windows incorrect mode | Called without `posix=False` on Windows, mishandling backslash-heavy paths in SHELL commands.
|
|
309
|
-
| AST executor `~`/`+` variable scoping broken | The AST executor passed `localvars` through function parameters but never pushed `CommandList` frames onto `commandliststack`. Legacy metacommand handlers (`x_sub`, `x_rm_sub`, `xf_sub_defined`, `SUB_LOCAL`, prompt handlers, REPL) access `commandliststack[-1]` for `~` local and `+` outer-scope variables. This caused `~` vars to be invisible to SQL, `SUB_DEFINED(~var)` to always return false, and the REPL `.vars`/`.stack` to show empty state. Fixed by pushing/popping `CommandList` frames in `execute()` and `_execute_script_native()`.
|
|
310
|
-
| Firebird adapter import | Adapter imported `fdb` (the unmaintained legacy driver) while the `[firebird]` extra declared `firebird-driver`. `pip install execsql2[firebird]` followed by a Firebird connect raised `ModuleNotFoundError: No module named 'fdb'`. Adapter now imports `firebird.driver`, matching the declared dependency.
|
|
311
|
-
| Connect timeouts on network adapters | MySQL, SQL Server / Access / DSN (pyodbc), Firebird, and SMTP all now apply a 30 s connect timeout matching the existing PostgreSQL default. A silently-dropped network peer (firewall rule, dead VM) used to hang scripts indefinitely; now the connect fails fast.
|
|
312
|
-
| AST parser INCLUDE quoted paths broken | The AST parser captured the full INCLUDE target including surrounding quotes (`"path"`), but the legacy dispatch regex stripped them. Quoted INCLUDE paths failed with "File does not exist" even when the file was present. Fixed by stripping matched quote pairs in the parser.
|
|
313
|
-
| AST parser `BEGIN SCRIPT name(params)` rejected | The regex required whitespace between the script name and parameter list. `BEGIN SCRIPT foo(a,b)` (no space before `(`) silently failed to match, causing the matching `END SCRIPT` to raise "Unmatched END SCRIPT metacommand." Fixed by allowing optional whitespace before the parameter expression.
|
|
314
|
-
| AST executor forward SCRIPT references broken | The legacy engine registered all `BEGIN SCRIPT` blocks at parse time (two-pass), so `EXECUTE SCRIPT foo` could appear before the `BEGIN SCRIPT foo` definition. The AST executor walked the tree in a single pass, so forward references failed with "There is no SCRIPT named foo." Fixed by adding a pre-registration scan of all SCRIPT blocks before execution begins.
|
|
315
|
-
| DB-export type inference overrides source types | `DataTable`/`Column` inferred column types from the *string shape* of values — correct for CSV import (everything is `str`) but wrong for DB-query exports where the driver returns typed Python objects. A text column with values like `"2026-06-30 10:07:20 PM"` was inferred as `TIMESTAMP`, causing DuckDB bind errors. SQLite, DuckDB, HDF5, and JSON-schema exports now pass `infer_strings=False` to `DataTable`: string values are classified as text types only, while native Python objects (`Decimal`, `datetime`, etc.) still run through the full accumulator set for accurate schema inference.
|
|
316
|
-
| `EXPORT FORMAT SQLITE` rejects `decimal.Decimal` | SQLite's Python adapter does not accept `Decimal` in `executemany`, raising `ProgrammingError`. SQLite exports now convert `Decimal` values to their exact string representation before binding; SQLite's NUMERIC affinity stores them without loss of precision.
|
|
317
|
-
| Unsupported Python objects crash native exports | `EXPORT FORMAT SQLITE` and `EXPORT FORMAT DUCKDB` raised bind errors when the DB driver returned user-defined Python objects (e.g. PostGIS geometry). Both exporters now stringify any object whose type is not in the adapter's safe-binding set, preserving values as their `str()` form instead of crashing.
|
|
318
|
-
| `HALT` with a message hangs unattended runs | The message-bearing `HALT` patterns are registered after the general one and so take priority, meaning `x_halt`'s `gui_level > 1` guard was never reached and every `HALT MESSAGE` opened a modal dialog — blocking cron and CI runs indefinitely at `gui_level` 0, contrary to the documented behavior. The guard now lives in `x_halt_msg`: without a GUI console and below `gui_level` 2, the message and any `DISPLAY` rowset are written to the error output and the script exits with the requested status. An empty `DISPLAY` table renders as headings plus a zero row count rather than nothing.
|
|
319
|
-
| Textual `HALT` dialog ignored `button_list` | The Textual `MsgScreen` hardcoded a Cancel/Continue pair and dropped the caller's `column_headers`/`rowset`, so a `HALT` asking for a single OK button offered a Cancel that exited with status 2 instead of the requested `EXIT_STATUS`, and `HALT ... DISPLAY` showed no table. `MsgScreen` now honors `button_list` and `no_cancel` (which also suppresses <kbd>Esc</kbd>) and renders the rowset, matching the Tkinter backend.
|
|
320
|
-
| `execsql-format` corrupts `E'...'` literals | sqlglot's Postgres tokenizer consumes backslash escapes inside an escape string but its generator never re-emits them (tobymao/sqlglot#8191), so `E'\\s+'` became `e'\s+'` — a regex matching the letter `s` rather than whitespace — losing one backslash per pass until `E'\\\\'` degraded to the unparsable `e'\''`. Escape strings are now masked out of the sqlglot round trip and restored byte-for-byte, independently of the installed sqlglot version.
|
|
321
|
-
| Formatter could not detect literal-level content loss | The content-loss guard deleted every non-alphanumeric character before comparing *lengths*, so any rewrite confined to punctuation was invisible to it at any threshold. A literal round-trip check now requires every string literal in the input to survive verbatim in the output, falling back to the unformatted text otherwise.
|
|
275
|
+
| Area | Fix |
|
|
276
|
+
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
277
|
+
| Oracle default port | Corrected from `5432` (PostgreSQL) to `1521`. |
|
|
278
|
+
| MySQL `LOAD DATA INFILE` encoding | Python encoding names are now mapped to MySQL charset names. |
|
|
279
|
+
| `dt_cast` type converters | Base `Database` class auto-populates 8 type converters that were previously left empty after the refactor. |
|
|
280
|
+
| `FileWriter` CPU busy-loop | Uses blocking `queue.get(timeout=0.1)` instead of `get_nowait()` in a tight loop. |
|
|
281
|
+
| Substitution variable cycles | 100-iteration limit prevents infinite loops on cyclic variable references. |
|
|
282
|
+
| Script location in error messages | `ErrInfo.script_file` and `script_line_no` are now populated via `stamp_errinfo()` so error output includes "Line N of script foo.sql" context — restoring behavior present in the monolith. |
|
|
283
|
+
| `$ERROR_MESSAGE` not updated | `$ERROR_MESSAGE` is now set on every error path: `exit_now()`, non-halting SQL errors, and non-halting metacommand errors. Previously it was initialized to `""` and never changed. |
|
|
284
|
+
| Metacommand error message lost | When `halt_on_metacommand_err` is `ON`, the original handler `ErrInfo` is now re-raised; the generic "Unknown metacommand" message no longer replaces the specific error from the handler. |
|
|
285
|
+
| Empty script name in error msg | `_execute_script_direct()` and `_execute_script_textual_console()` no longer append "in script , line 0" to uncaught-exception messages when `current_script_line()` returns an empty string. |
|
|
286
|
+
| `PROMPT COMPARE` diff comparison | Diff engine uses native Python equality instead of string comparison — numeric types, Decimals, and booleans compare correctly. `None` is distinguished from empty string. Columns are matched by name (not position), key columns are excluded from comparison, and duplicate PKs keep the first row. |
|
|
287
|
+
| `win_config_file` broken | Checked `os.name == "windows"` which Python never returns (correct value is `"nt"`). Fixed to `os.name == "nt"`. |
|
|
288
|
+
| ELSEIF + ANDIF/ORIF | ANDIF/ORIF after an ELSEIF were silently attached to the parent IF condition instead of the ELSEIF clause. The compound condition was never evaluated for the ELSEIF branch. Fixed in the AST parser and executor. |
|
|
289
|
+
| Cursor leak in `select_rowsource()` | Cursor was not closed on query execution failure. Row generators in EXPORT and COPY paths were not explicitly closed on error, relying on garbage collection for cleanup. |
|
|
290
|
+
| `NumericParser` right-associative | Arithmetic operators were parsed right-to-left. `10 - 3 - 2` evaluated as `9` instead of `5`. Fixed to left-associative parsing. |
|
|
291
|
+
| Empty-column check precedence | `DataTable` and `Database.populate_table()` had an operator precedence bug in the extra-column emptiness check — a redundant `and conf.del_empty_cols` caused incorrect short-circuit evaluation. |
|
|
292
|
+
| SQLite import string processing | `SQLiteDatabase.populate_table()` applied `trim_strings`, `replace_newlines`, and `empty_strings` after copying row data, so processing never reached the INSERT. Fixed to process before extraction. |
|
|
293
|
+
| `$CURRENT_DATABASE`/`$CURRENT_DBMS` stale after USE | These variables were only set at startup and on CONNECT, not refreshed when `USE` switched the active database. Now set in `set_static_system_vars()` so they update on any connection change. |
|
|
294
|
+
| `DT_Text.data_type_name` wrong | Was `"character"` (same as `DT_Character`), making error messages indistinguishable. Corrected to `"text"`. |
|
|
295
|
+
| `DT_Varchar` non-string data unchecked | `_from_data()` only enforced the 255-char limit for `str` inputs; non-string values passed through without conversion or length check. |
|
|
296
|
+
| `WriteHooks.write_err()` crash on empty string | `strval[-1]` raised `IndexError` on empty input. Fixed to use `str.endswith()`. |
|
|
297
|
+
| `NumericParser` division by zero | `NumericAstNode.eval()` raised unhandled `ZeroDivisionError`. Now raises `NumericParserError` with a clear message. |
|
|
298
|
+
| `CondAstNode.eval()` could return `None` | Missing fallthrough for unknown node types silently returned `None`. Now raises `CondParserError`. |
|
|
299
|
+
| `DT_Timestamp` claims time-only values | `dateutil.parser.parse()` silently fills in today's date for bare time strings like `"13:15:45"`, so `DT_Timestamp` matched before `DT_Time` in the inference order. `parse_datetime()` now rejects time-only strings. |
|
|
300
|
+
| `CounterVars.substitute` skipped pos 0–1 | `re.I` was passed as the positional `pos` argument, skipping the first 2 characters of every string during counter variable expansion. Counter variables at the very start of a line were never matched. |
|
|
301
|
+
| `exec_cmd` (SQLite/DuckDB) always raised TypeError | Passed bytes to `curs.execute()` via `.encode()`, which Python 3 `sqlite3`/`duckdb` reject. `EXECUTE PROCEDURE` metacommand was non-functional on these backends. |
|
|
302
|
+
| MySQL `LOAD DATA INFILE` injection | File path, delimiter, and quotechar were interpolated without escaping. Now single-quotes are escaped consistent with the PostgreSQL COPY path. |
|
|
303
|
+
| Missing server/database name at connect | Connecting to a server-based database without a server or database name now stops with a clear fatal error ("Configured database requires a server name, but none is provided.") instead of crashing inside the driver with a `TypeError`. |
|
|
304
|
+
| Config file chain infinite loop | The `config_file` directive could chain config files without limit. A circular reference (via symlinks or different relative paths) caused an infinite loop at startup. Now capped at 20 files. |
|
|
305
|
+
| Cursor leaks in database adapters | ~15 methods across all adapters used `curs = self.cursor()` / `curs.close()` without `try/finally`. If the query raised, the cursor leaked. Converted to `with self._cursor() as curs:`. |
|
|
306
|
+
| JSON export malformed on special column names | Column names containing `"` or `\` produced invalid JSON. Now uses `json.dumps()` for all field names. |
|
|
307
|
+
| Temp file creation TOCTOU race | `TempFileMgr.new_temp_fn()` discarded the `NamedTemporaryFile` handle, creating a race window. Now uses `tempfile.mkstemp()` for secure creation. |
|
|
308
|
+
| `shlex.split` on Windows incorrect mode | Called without `posix=False` on Windows, mishandling backslash-heavy paths in SHELL commands. |
|
|
309
|
+
| AST executor `~`/`+` variable scoping broken | The AST executor passed `localvars` through function parameters but never pushed `CommandList` frames onto `commandliststack`. Legacy metacommand handlers (`x_sub`, `x_rm_sub`, `xf_sub_defined`, `SUB_LOCAL`, prompt handlers, REPL) access `commandliststack[-1]` for `~` local and `+` outer-scope variables. This caused `~` vars to be invisible to SQL, `SUB_DEFINED(~var)` to always return false, and the REPL `.vars`/`.stack` to show empty state. Fixed by pushing/popping `CommandList` frames in `execute()` and `_execute_script_native()`. |
|
|
310
|
+
| Firebird adapter import | Adapter imported `fdb` (the unmaintained legacy driver) while the `[firebird]` extra declared `firebird-driver`. `pip install execsql2[firebird]` followed by a Firebird connect raised `ModuleNotFoundError: No module named 'fdb'`. Adapter now imports `firebird.driver`, matching the declared dependency. |
|
|
311
|
+
| Connect timeouts on network adapters | MySQL, SQL Server / Access / DSN (pyodbc), Firebird, and SMTP all now apply a 30 s connect timeout matching the existing PostgreSQL default. A silently-dropped network peer (firewall rule, dead VM) used to hang scripts indefinitely; now the connect fails fast. |
|
|
312
|
+
| AST parser INCLUDE quoted paths broken | The AST parser captured the full INCLUDE target including surrounding quotes (`"path"`), but the legacy dispatch regex stripped them. Quoted INCLUDE paths failed with "File does not exist" even when the file was present. Fixed by stripping matched quote pairs in the parser. |
|
|
313
|
+
| AST parser `BEGIN SCRIPT name(params)` rejected | The regex required whitespace between the script name and parameter list. `BEGIN SCRIPT foo(a,b)` (no space before `(`) silently failed to match, causing the matching `END SCRIPT` to raise "Unmatched END SCRIPT metacommand." Fixed by allowing optional whitespace before the parameter expression. |
|
|
314
|
+
| AST executor forward SCRIPT references broken | The legacy engine registered all `BEGIN SCRIPT` blocks at parse time (two-pass), so `EXECUTE SCRIPT foo` could appear before the `BEGIN SCRIPT foo` definition. The AST executor walked the tree in a single pass, so forward references failed with "There is no SCRIPT named foo." Fixed by adding a pre-registration scan of all SCRIPT blocks before execution begins. |
|
|
315
|
+
| DB-export type inference overrides source types | `DataTable`/`Column` inferred column types from the *string shape* of values — correct for CSV import (everything is `str`) but wrong for DB-query exports where the driver returns typed Python objects. A text column with values like `"2026-06-30 10:07:20 PM"` was inferred as `TIMESTAMP`, causing DuckDB bind errors. SQLite, DuckDB, HDF5, and JSON-schema exports now pass `infer_strings=False` to `DataTable`: string values are classified as text types only, while native Python objects (`Decimal`, `datetime`, etc.) still run through the full accumulator set for accurate schema inference. |
|
|
316
|
+
| `EXPORT FORMAT SQLITE` rejects `decimal.Decimal` | SQLite's Python adapter does not accept `Decimal` in `executemany`, raising `ProgrammingError`. SQLite exports now convert `Decimal` values to their exact string representation before binding; SQLite's NUMERIC affinity stores them without loss of precision. |
|
|
317
|
+
| Unsupported Python objects crash native exports | `EXPORT FORMAT SQLITE` and `EXPORT FORMAT DUCKDB` raised bind errors when the DB driver returned user-defined Python objects (e.g. PostGIS geometry). Both exporters now stringify any object whose type is not in the adapter's safe-binding set, preserving values as their `str()` form instead of crashing. |
|
|
318
|
+
| `HALT` with a message hangs unattended runs | The message-bearing `HALT` patterns are registered after the general one and so take priority, meaning `x_halt`'s `gui_level > 1` guard was never reached and every `HALT MESSAGE` opened a modal dialog — blocking cron and CI runs indefinitely at `gui_level` 0, contrary to the documented behavior. The guard now lives in `x_halt_msg`: without a GUI console and below `gui_level` 2, the message and any `DISPLAY` rowset are written to the error output and the script exits with the requested status. An empty `DISPLAY` table renders as headings plus a zero row count rather than nothing. |
|
|
319
|
+
| Textual `HALT` dialog ignored `button_list` | The Textual `MsgScreen` hardcoded a Cancel/Continue pair and dropped the caller's `column_headers`/`rowset`, so a `HALT` asking for a single OK button offered a Cancel that exited with status 2 instead of the requested `EXIT_STATUS`, and `HALT ... DISPLAY` showed no table. `MsgScreen` now honors `button_list` and `no_cancel` (which also suppresses <kbd>Esc</kbd>) and renders the rowset, matching the Tkinter backend. |
|
|
320
|
+
| `execsql-format` corrupts `E'...'` literals | sqlglot's Postgres tokenizer consumes backslash escapes inside an escape string but its generator never re-emits them (tobymao/sqlglot#8191), so `E'\\s+'` became `e'\s+'` — a regex matching the letter `s` rather than whitespace — losing one backslash per pass until `E'\\\\'` degraded to the unparsable `e'\''`. Escape strings are now masked out of the sqlglot round trip and restored byte-for-byte, independently of the installed sqlglot version. |
|
|
321
|
+
| Formatter could not detect literal-level content loss | The content-loss guard deleted every non-alphanumeric character before comparing *lengths*, so any rewrite confined to punctuation was invisible to it at any threshold. A literal round-trip check now requires every string literal in the input to survive verbatim in the output, falling back to the unformatted text otherwise. |
|
|
322
|
+
| Formatter indents inside multi-line literals | Block indentation was applied to every line of a multi-line literal (`$$…$$` body or a `'…'` string spanning lines), so a literal inside an `IF`, `LOOP`, or `BEGIN SQL` block gained the block's leading whitespace on each continuation line — changing the value stored by the database. Lines that begin inside a dollar-quoted literal are now emitted verbatim and excluded from the indent arithmetic. Neither the literal round-trip guard (which covers only the sqlglot round trip) nor the existing idempotency test (which compares pass 1 to pass 2, while the indent is applied once and then stable) could detect it. |
|
|
323
|
+
| Comma passes rewrite multi-line literals | `--leading-comma` and the trailing-comma normalization that precedes it moved a comma across a line break inside a multi-line literal, changing the stored value. Both now skip every line such a literal touches. |
|
|
324
|
+
| Formatter never converged on unparsable statements | Comments are hidden from sqlglot as `/* marker */ line`. Removing the marker left the injected separator space behind, which was then measured as indentation — so a statement sqlglot could not parse (and therefore returned verbatim) gained one space on every run and never reached a fixed point, leaving `--check` permanently failing. Adjacent comments compounded it, leaving residue mid-expression that took a second pass to normalise. Marker runs are now removed together with the whitespace they introduced, and indentation is read from the line itself. |
|
|
325
|
+
| Formatter dropped clauses from unparsable SQL | The sqlglot parse ran at `ErrorLevel.IGNORE`, which answers a statement it cannot parse with a partial AST rather than an error — the tokens it failed on are absent, and regenerating from that AST wrote back SQL the author never had. `INSERT ... CROSS JOIN LATERAL (VALUES ...) AS g(a, b) ON CONFLICT (a) DO NOTHING` came back without its `DO NOTHING`, a syntax error that `--in-place` reported as `reformatted`. Every guard passed it: one statement for one semicolon, 88% of the input's alphanumeric characters, and no string literals to round-trip. The guards are quantitative and the loss is qualitative — a dropped `DISTINCT`, `CASCADE`, `DESC`, or `NOT` is smaller still — so the parse now runs at `ErrorLevel.RAISE` and SQL that does not fully parse is emitted exactly as written. |
|
|
322
326
|
|
|
323
327
|
______________________________________________________________________
|
|
324
328
|
|
|
@@ -89,20 +89,35 @@ Block comments (`/* */`) that contain `-- !x!` metacommand markers (e.g. comment
|
|
|
89
89
|
|
|
90
90
|
#### Variable preservation
|
|
91
91
|
|
|
92
|
-
execsql substitution variables (`!!varname!!`, `!{varname}!`) are replaced with valid SQL identifiers before formatting, then restored afterward, so the formatter does not corrupt them — including in schema-qualified names (`!!staging!!.!!table!!`), CASE expressions, JOIN conditions, and string concatenation.
|
|
92
|
+
execsql substitution variables (`!!varname!!`, `!{varname}!`) are replaced with valid SQL identifiers before formatting, then restored afterward, so the formatter does not corrupt them — including in schema-qualified names (`!!staging!!.!!table!!`), CASE expressions, JOIN conditions, and string concatenation. A variable that holds a *fragment* rather than a value — a `!!~var!!` standing alone in a `WHERE` clause, as the upsert templates use for optional predicates — leaves the statement unparsable once masked, so the statement is passed through untouched rather than reformatted without it (see [fallback behavior](#fallback-behavior)).
|
|
93
93
|
|
|
94
94
|
#### String literal preservation { #string_literals }
|
|
95
95
|
|
|
96
|
-
Formatting never changes what a string literal contains.
|
|
96
|
+
Formatting never changes what a string literal contains. Four mechanisms enforce this:
|
|
97
97
|
|
|
98
98
|
- PostgreSQL escape strings (`E'...'`) are held out of the sqlglot round trip entirely and restored byte-for-byte, keeping both their backslash escapes and their `E` prefix. This matters because sqlglot consumes backslash escapes inside an escape string without re-emitting them, which would turn `E'\\s+'` (a regex matching whitespace) into `e'\s+'` (a regex matching the letter `s`).
|
|
99
|
-
-
|
|
99
|
+
- Indentation is never applied inside a multi-line literal — a dollar-quoted body (`$$...$$`, `$tag$...$tag$`) or an ordinary `'...'` string that spans lines. Leading whitespace on a continuation line is part of the stored value, not layout. The line that *opens* the literal is ordinary SQL and is indented with the statement around it, but every line from there to the closing delimiter is emitted exactly as written. Such a literal therefore keeps its original whitespace regardless of `--indent` or how deeply the statement is nested — which means its body will not line up visually with the statement that contains it. That is unavoidable: indenting it would change the string.
|
|
100
|
+
- Commas are never moved into or out of a multi-line literal. `--leading-comma`, and the trailing-comma normalization that precedes it, both skip every line such a literal touches, including the line that opens it. A comma inside a multi-line string is data, so repositioning it would change the value rather than the layout.
|
|
101
|
+
- Literals that do pass through sqlglot — ordinary single-line `'...'` strings — are compared before and after. If any fails to come back unchanged, the statement is left unformatted rather than rewritten.
|
|
100
102
|
|
|
101
|
-
The
|
|
103
|
+
The last check is deliberately conservative: a statement may occasionally be left alone when the rewrite would in fact have been harmless (for example, sqlglot normalizes `interval '1 day'` to `INTERVAL '1 DAY'`, which changes the literal's text but not its meaning). Losing formatting on a statement is recoverable; silently changing what a query does is not.
|
|
102
104
|
|
|
103
|
-
#### Fallback behavior
|
|
105
|
+
#### Fallback behavior { #fallback-behavior }
|
|
104
106
|
|
|
105
|
-
|
|
107
|
+
SQL that sqlglot cannot fully parse is left exactly as written. The parse is strict: if any statement in a run of SQL fails to parse, that whole run is emitted verbatim and only its indentation is normalized. Nothing partially understood is ever regenerated.
|
|
108
|
+
|
|
109
|
+
That strictness is what keeps a clause from disappearing. Given a partial parse, sqlglot returns the fragment it did understand and drops the rest, so
|
|
110
|
+
|
|
111
|
+
```sql
|
|
112
|
+
INSERT INTO t (a, b)
|
|
113
|
+
SELECT x, y FROM src
|
|
114
|
+
CROSS JOIN LATERAL (VALUES (1, 2)) AS g(a, b)
|
|
115
|
+
ON CONFLICT(a) DO NOTHING;
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
came back without its `DO NOTHING` — one statement in, one statement out, nearly all of the text intact, and no longer valid SQL. A dropped `DISTINCT`, `CASCADE`, `DESC`, or `NOT` costs even fewer characters, so no content-loss threshold can catch this class; only the parser knows whether it understood the whole statement.
|
|
119
|
+
|
|
120
|
+
Formatting is also skipped when safety checks detect that it would corrupt SQL it did parse — statement count changes, significant content loss, or an altered [string literal](#string_literals). In every case the original text is preserved unchanged.
|
|
106
121
|
|
|
107
122
|
Use `--no-sql` to skip SQL reformatting entirely and only normalize metacommands.
|
|
108
123
|
|
|
@@ -169,7 +184,7 @@ select id,name,created_at from users where active = true order by name;
|
|
|
169
184
|
```yaml
|
|
170
185
|
repos:
|
|
171
186
|
- repo: https://github.com/geocoug/execsql
|
|
172
|
-
rev: v2.22.
|
|
187
|
+
rev: v2.22.7
|
|
173
188
|
hooks:
|
|
174
189
|
- id: execsql-format
|
|
175
190
|
```
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "execsql2"
|
|
7
|
-
version = "2.22.
|
|
7
|
+
version = "2.22.7"
|
|
8
8
|
description = "Runs a SQL script against a PostgreSQL, SQLite, MariaDB/MySQL, DuckDB, Firebird, MS-Access, MS-SQL-Server, or Oracle database, or an ODBC DSN. Provides metacommands to import and export data, copy data between databases, conditionally execute SQL and metacommands, and dynamically alter SQL and metacommands with substitution variables."
|
|
9
9
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
10
|
license = { file = "LICENSE.txt" }
|
|
@@ -178,7 +178,7 @@ skip-magic-trailing-comma = false
|
|
|
178
178
|
line-ending = "auto"
|
|
179
179
|
|
|
180
180
|
[tool.bumpversion]
|
|
181
|
-
current_version = "2.22.
|
|
181
|
+
current_version = "2.22.7"
|
|
182
182
|
commit = true
|
|
183
183
|
tag = true
|
|
184
184
|
tag_name = "v{new_version}"
|