execsql2 2.4.4__py3-none-any.whl → 2.4.5__py3-none-any.whl
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.
- execsql/metacommands/dispatch.py +91 -2
- {execsql2-2.4.4.dist-info → execsql2-2.4.5.dist-info}/METADATA +30 -3
- {execsql2-2.4.4.dist-info → execsql2-2.4.5.dist-info}/RECORD +22 -22
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/README.md +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/config_settings.sqlite +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/example_config_prompt.sql +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/execsql.conf +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/make_config_db.sql +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/md_compare.sql +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/md_glossary.sql +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/md_upsert.sql +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/pg_compare.sql +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/pg_glossary.sql +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/pg_upsert.sql +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/script_template.sql +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/ss_compare.sql +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/ss_glossary.sql +0 -0
- {execsql2-2.4.4.data → execsql2-2.4.5.data}/data/execsql2_extras/ss_upsert.sql +0 -0
- {execsql2-2.4.4.dist-info → execsql2-2.4.5.dist-info}/WHEEL +0 -0
- {execsql2-2.4.4.dist-info → execsql2-2.4.5.dist-info}/entry_points.txt +0 -0
- {execsql2-2.4.4.dist-info → execsql2-2.4.5.dist-info}/licenses/LICENSE.txt +0 -0
- {execsql2-2.4.4.dist-info → execsql2-2.4.5.dist-info}/licenses/NOTICE +0 -0
execsql/metacommands/dispatch.py
CHANGED
|
@@ -169,6 +169,7 @@ from execsql.metacommands.system import (
|
|
|
169
169
|
x_cancel_halt,
|
|
170
170
|
x_cancel_halt_email,
|
|
171
171
|
x_cancel_halt_email_clear,
|
|
172
|
+
x_cancel_halt_exec,
|
|
172
173
|
x_cancel_halt_exec_clear,
|
|
173
174
|
x_cancel_halt_write,
|
|
174
175
|
x_cancel_halt_write_clear,
|
|
@@ -185,6 +186,7 @@ from execsql.metacommands.system import (
|
|
|
185
186
|
x_email,
|
|
186
187
|
x_error_halt_email,
|
|
187
188
|
x_error_halt_email_clear,
|
|
189
|
+
x_error_halt_exec,
|
|
188
190
|
x_error_halt_exec_clear,
|
|
189
191
|
x_error_halt_write,
|
|
190
192
|
x_error_halt_write_clear,
|
|
@@ -1030,6 +1032,10 @@ def build_dispatch_table() -> MetaCommandList:
|
|
|
1030
1032
|
x_error_halt_email,
|
|
1031
1033
|
)
|
|
1032
1034
|
mcl.add(r"^\s*ON\s+ERROR_HALT\s+EXEC\s+CLEAR\s*$", x_error_halt_exec_clear)
|
|
1035
|
+
mcl.add(
|
|
1036
|
+
r'^\s*ON\s+ERROR_HALT\s+EXEC(?:UTE)?\s+SCRIPT(?:\s+(?P<exists>IF\s+EXISTS))?\s+(?P<script_id>\w+)(?:(?:\s+WITH)?(?:\s+ARG(?:UMENT)?S?)?\s*\(\s*(?P<argexp>#?\w+\s*=\s*(?:(?:[^"\'\[][^,\)]*)|(?:"[^"]*")|(?:\'[^\']*\')|(?:\[[^\]]*\]))(?:\s*,\s*#?\w+\s*=\s*(?:(?:[^"\'\[][^,\)]*)|(?:"[^"]*")|(?:\'[^\']*\')|(?:\[[^\]]*\])))*)\s*\))?(?:\s+(?P<looptype>WHILE|UNTIL)\s*\(\s*(?P<loopcond>.+)\s*\))?\s*$',
|
|
1037
|
+
x_error_halt_exec,
|
|
1038
|
+
)
|
|
1033
1039
|
mcl.add(
|
|
1034
1040
|
r"^\s*ON\s+CANCEL_HALT\s+WRITE\s+CLEAR\s*$",
|
|
1035
1041
|
x_cancel_halt_write_clear,
|
|
@@ -1077,6 +1083,10 @@ def build_dispatch_table() -> MetaCommandList:
|
|
|
1077
1083
|
x_cancel_halt_email,
|
|
1078
1084
|
)
|
|
1079
1085
|
mcl.add(r"^\s*ON\s+CANCEL_HALT\s+EXEC\s+CLEAR\s*$", x_cancel_halt_exec_clear)
|
|
1086
|
+
mcl.add(
|
|
1087
|
+
r'^\s*ON\s+CANCEL_HALT\s+EXEC(?:UTE)?\s+SCRIPT(?:\s+(?P<exists>IF\s+EXISTS))?\s+(?P<script_id>\w+)(?:(?:\s+WITH)?(?:\s+ARG(?:UMENT)?S?)?\s*\(\s*(?P<argexp>#?\w+\s*=\s*(?:(?:[^"\'\[][^,\)]*)|(?:"[^"]*")|(?:\'[^\']*\')|(?:\[[^\]]*\]))(?:\s*,\s*#?\w+\s*=\s*(?:(?:[^"\'\[][^,\)]*)|(?:"[^"]*")|(?:\'[^\']*\')|(?:\[[^\]]*\])))*)\s*\))?(?:\s+(?P<looptype>WHILE|UNTIL)\s*\(\s*(?P<loopcond>.+)\s*\))?\s*$',
|
|
1088
|
+
x_cancel_halt_exec,
|
|
1089
|
+
)
|
|
1080
1090
|
|
|
1081
1091
|
# ------------------------------------------------------------------
|
|
1082
1092
|
# SUB_TEMPFILE
|
|
@@ -1680,16 +1690,54 @@ def build_dispatch_table() -> MetaCommandList:
|
|
|
1680
1690
|
)
|
|
1681
1691
|
mcl.add(
|
|
1682
1692
|
(
|
|
1693
|
+
# SERVER unquoted, DB unquoted, PASSWORD unquoted
|
|
1683
1694
|
r"^CONNECT\s+TO\s+SQLSERVER\s*\(\s*SERVER\s*=\s*(?P<server>[A-Z0-9][A-Z0-9_\/\\\-\.]*)\s*,\s*"
|
|
1684
1695
|
r"DB\s*=\s*(?P<db_name>[A-Z][A-Z0-9_\-]*)(?:\s*,\s*USER\s*=\s*(?P<user>[A-Z][A-Z0-9_~`!@#$%^&\*\+=\/\?\.-]*)"
|
|
1685
1696
|
r"\s*,\s*NEED_PWD\s*=\s*(?P<need_pwd>TRUE|FALSE))?(?:\s*,\s*PORT\s*=\s*(?P<port>\d+))?"
|
|
1686
1697
|
r"(?:\s*,\s+PASSWORD\s*=\s*(?P<password>[^\s\)]+))?"
|
|
1687
1698
|
r"(?:\s*,\s*ENCODING\s*=\s*(?P<encoding>[A-Z][A-Z0-9_-]+))?\s*\)\s+AS\s+(?P<db_alias>[A-Z][A-Z0-9_]*)\s*$",
|
|
1699
|
+
# SERVER quoted, DB quoted, PASSWORD unquoted
|
|
1688
1700
|
r'^CONNECT\s+TO\s+SQLSERVER\s*\(\s*SERVER\s*=\s*"(?P<server>[A-Z0-9][A-Z0-9_\/\\\s\-\.]*)"\s*,\s*'
|
|
1689
1701
|
r'DB\s*=\s*"(?P<db_name>[A-Z][A-Z0-9_\-\s]*)"(?:\s*,\s*USER\s*=\s*(?P<user>[A-Z][A-Z0-9_~`!@#$%^&\*\+=\/\?\.-]*)'
|
|
1690
1702
|
r"\s*,\s*NEED_PWD\s*=\s*(?P<need_pwd>TRUE|FALSE))?(?:\s*,\s*PORT\s*=\s*(?P<port>\d+))?"
|
|
1691
1703
|
r"(?:\s*,\s+PASSWORD\s*=\s*(?P<password>[^\s\)]+))?"
|
|
1692
1704
|
r"(?:\s*,\s*ENCODING\s*=\s*(?P<encoding>[A-Z][A-Z0-9_-]+))?\s*\)\s+AS\s+(?P<db_alias>[A-Z][A-Z0-9_]*)\s*$",
|
|
1705
|
+
# SERVER quoted, DB unquoted, PASSWORD unquoted
|
|
1706
|
+
r'^CONNECT\s+TO\s+SQLSERVER\s*\(\s*SERVER\s*=\s*"(?P<server>[A-Z0-9][A-Z0-9_\/\\\s\-\.]*)"\s*,\s*'
|
|
1707
|
+
r"DB\s*=\s*(?P<db_name>[A-Z][A-Z0-9_\-]*)(?:\s*,\s*USER\s*=\s*(?P<user>[A-Z][A-Z0-9_~`!@#$%^&\*\+=\/\?\.-]*)"
|
|
1708
|
+
r"\s*,\s*NEED_PWD\s*=\s*(?P<need_pwd>TRUE|FALSE))?(?:\s*,\s*PORT\s*=\s*(?P<port>\d+))?"
|
|
1709
|
+
r"(?:\s*,\s+PASSWORD\s*=\s*(?P<password>[^\s\)]+))?"
|
|
1710
|
+
r"(?:\s*,\s*ENCODING\s*=\s*(?P<encoding>[A-Z][A-Z0-9_-]+))?\s*\)\s+AS\s+(?P<db_alias>[A-Z][A-Z0-9_]*)\s*$",
|
|
1711
|
+
# SERVER unquoted, DB quoted, PASSWORD unquoted
|
|
1712
|
+
r"^CONNECT\s+TO\s+SQLSERVER\s*\(\s*SERVER\s*=\s*(?P<server>[A-Z0-9][A-Z0-9_\/\\\-\.]*)\s*,\s*"
|
|
1713
|
+
r'DB\s*=\s*"(?P<db_name>[A-Z][A-Z0-9_\- ]*)"(?:\s*,\s*USER\s*=\s*(?P<user>[A-Z][A-Z0-9_~`!@#$%^&\*\+=\/\?\.-]*)'
|
|
1714
|
+
r"\s*,\s*NEED_PWD\s*=\s*(?P<need_pwd>TRUE|FALSE))?(?:\s*,\s*PORT\s*=\s*(?P<port>\d+))?"
|
|
1715
|
+
r"(?:\s*,\s+PASSWORD\s*=\s*(?P<password>[^\s\)]+))?"
|
|
1716
|
+
r"(?:\s*,\s*ENCODING\s*=\s*(?P<encoding>[A-Z][A-Z0-9_-]+))?\s*\)\s+AS\s+(?P<db_alias>[A-Z][A-Z0-9_]*)\s*$",
|
|
1717
|
+
# SERVER unquoted, DB unquoted, PASSWORD quoted
|
|
1718
|
+
r"^CONNECT\s+TO\s+SQLSERVER\s*\(\s*SERVER\s*=\s*(?P<server>[A-Z0-9][A-Z0-9_\/\\\-\.]*)\s*,\s*"
|
|
1719
|
+
r"DB\s*=\s*(?P<db_name>[A-Z][A-Z0-9_\-]*)(?:\s*,\s*USER\s*=\s*(?P<user>[A-Z][A-Z0-9_~`!@#$%^&\*\+=\/\?\.-]*)"
|
|
1720
|
+
r"\s*,\s*NEED_PWD\s*=\s*(?P<need_pwd>TRUE|FALSE))?(?:\s*,\s*PORT\s*=\s*(?P<port>\d+))?"
|
|
1721
|
+
r'(?:\s*,\s+PASSWORD\s*=\s*(?P<password>"[^\s\)]+"))?'
|
|
1722
|
+
r"(?:\s*,\s*ENCODING\s*=\s*(?P<encoding>[A-Z][A-Z0-9_-]+))?\s*\)\s+AS\s+(?P<db_alias>[A-Z][A-Z0-9_]*)\s*$",
|
|
1723
|
+
# SERVER quoted, DB quoted, PASSWORD quoted
|
|
1724
|
+
r'^CONNECT\s+TO\s+SQLSERVER\s*\(\s*SERVER\s*=\s*"(?P<server>[A-Z0-9][A-Z0-9_\/\\\s\-\.]*)"\s*,\s*'
|
|
1725
|
+
r'DB\s*=\s*"(?P<db_name>[A-Z][A-Z0-9_\-\s]*)"(?:\s*,\s*USER\s*=\s*(?P<user>[A-Z][A-Z0-9_~`!@#$%^&\*\+=\/\?\.-]*)'
|
|
1726
|
+
r"\s*,\s*NEED_PWD\s*=\s*(?P<need_pwd>TRUE|FALSE))?(?:\s*,\s*PORT\s*=\s*(?P<port>\d+))?"
|
|
1727
|
+
r'(?:\s*,\s+PASSWORD\s*=\s*(?P<password>"[^\s\)]+"))?'
|
|
1728
|
+
r"(?:\s*,\s*ENCODING\s*=\s*(?P<encoding>[A-Z][A-Z0-9_-]+))?\s*\)\s+AS\s+(?P<db_alias>[A-Z][A-Z0-9_]*)\s*$",
|
|
1729
|
+
# SERVER quoted, DB unquoted, PASSWORD quoted
|
|
1730
|
+
r'^CONNECT\s+TO\s+SQLSERVER\s*\(\s*SERVER\s*=\s*"(?P<server>[A-Z0-9][A-Z0-9_\/\\\s\-\.]*)"\s*,\s*'
|
|
1731
|
+
r"DB\s*=\s*(?P<db_name>[A-Z][A-Z0-9_\-]*)(?:\s*,\s*USER\s*=\s*(?P<user>[A-Z][A-Z0-9_~`!@#$%^&\*\+=\/\?\.-]*)"
|
|
1732
|
+
r"\s*,\s*NEED_PWD\s*=\s*(?P<need_pwd>TRUE|FALSE))?(?:\s*,\s*PORT\s*=\s*(?P<port>\d+))?"
|
|
1733
|
+
r'(?:\s*,\s+PASSWORD\s*=\s*(?P<password>"[^\s\)]+"))?'
|
|
1734
|
+
r"(?:\s*,\s*ENCODING\s*=\s*(?P<encoding>[A-Z][A-Z0-9_-]+))?\s*\)\s+AS\s+(?P<db_alias>[A-Z][A-Z0-9_]*)\s*$",
|
|
1735
|
+
# SERVER unquoted, DB quoted, PASSWORD quoted
|
|
1736
|
+
r"^CONNECT\s+TO\s+SQLSERVER\s*\(\s*SERVER\s*=\s*(?P<server>[A-Z0-9][A-Z0-9_\/\\\-\.]*)\s*,\s*"
|
|
1737
|
+
r'DB\s*=\s*"(?P<db_name>[A-Z][A-Z0-9_\- ]*)"(?:\s*,\s*USER\s*=\s*(?P<user>[A-Z][A-Z0-9_~`!@#$%^&\*\+=\/\?\.-]*)'
|
|
1738
|
+
r"\s*,\s*NEED_PWD\s*=\s*(?P<need_pwd>TRUE|FALSE))?(?:\s*,\s*PORT\s*=\s*(?P<port>\d+))?"
|
|
1739
|
+
r'(?:\s*,\s+PASSWORD\s*=\s*(?P<password>"[^\s\)]+"))?'
|
|
1740
|
+
r"(?:\s*,\s*ENCODING\s*=\s*(?P<encoding>[A-Z][A-Z0-9_-]+))?\s*\)\s+AS\s+(?P<db_alias>[A-Z][A-Z0-9_]*)\s*$",
|
|
1693
1741
|
),
|
|
1694
1742
|
x_connect_ssvr,
|
|
1695
1743
|
)
|
|
@@ -1722,6 +1770,12 @@ def build_dispatch_table() -> MetaCommandList:
|
|
|
1722
1770
|
# ------------------------------------------------------------------
|
|
1723
1771
|
# APPEND/EXTEND SCRIPT
|
|
1724
1772
|
# ------------------------------------------------------------------
|
|
1773
|
+
mcl.add(
|
|
1774
|
+
r"\s*EXTEND\s+SCRIPT\s+(?P<script2>\w+)\s+WITH\s+SCRIPT\s+(?P<script1>\w+)\s*$",
|
|
1775
|
+
x_extendscript,
|
|
1776
|
+
description="EXTEND SCRIPT",
|
|
1777
|
+
category="action",
|
|
1778
|
+
)
|
|
1725
1779
|
mcl.add(
|
|
1726
1780
|
r"\s*APPEND\s+SCRIPT\s+(?P<script1>\w+)\s+TO\s+(?P<script2>\w+)\s*$",
|
|
1727
1781
|
x_extendscript,
|
|
@@ -1897,13 +1951,48 @@ def build_dispatch_table() -> MetaCommandList:
|
|
|
1897
1951
|
# ------------------------------------------------------------------
|
|
1898
1952
|
mcl.add(
|
|
1899
1953
|
ins_table_rxs(
|
|
1900
|
-
r
|
|
1901
|
-
r
|
|
1954
|
+
r"^\s*PROMPT\s+ASK\s+'(?P<question>[^']+)'\s+SUB\s+(?P<match>~?\w+)(?:\s+DISPLAY\s+",
|
|
1955
|
+
r")?(?:\s+HELP\s+(?P<help>[^\s]+))?\s*$",
|
|
1902
1956
|
),
|
|
1903
1957
|
x_prompt_ask,
|
|
1904
1958
|
description="PROMPT ASK",
|
|
1905
1959
|
category="prompt",
|
|
1906
1960
|
)
|
|
1961
|
+
mcl.add(
|
|
1962
|
+
ins_table_rxs(
|
|
1963
|
+
r"^\s*PROMPT\s+ASK\s+'(?P<question>[^']+)'\s+SUB\s+(?P<match>~?\w+)(?:\s+DISPLAY\s+",
|
|
1964
|
+
r')?(?:\s+HELP\s+"(?P<help>[^"]+)")?\s*$',
|
|
1965
|
+
),
|
|
1966
|
+
x_prompt_ask,
|
|
1967
|
+
)
|
|
1968
|
+
mcl.add(
|
|
1969
|
+
ins_table_rxs(
|
|
1970
|
+
r"^\s*PROMPT\s+ASK\s+\[(?P<question>[^\]]+)\]\s+SUB\s+(?P<match>~?\w+)(?:\s+DISPLAY\s+",
|
|
1971
|
+
r")?(?:\s+HELP\s+(?P<help>[^\s]+))?\s*$",
|
|
1972
|
+
),
|
|
1973
|
+
x_prompt_ask,
|
|
1974
|
+
)
|
|
1975
|
+
mcl.add(
|
|
1976
|
+
ins_table_rxs(
|
|
1977
|
+
r"^\s*PROMPT\s+ASK\s+\[(?P<question>[^\]]+)\]\s+SUB\s+(?P<match>~?\w+)(?:\s+DISPLAY\s+",
|
|
1978
|
+
r')?(?:\s+HELP\s+"(?P<help>[^"]+)")?\s*$',
|
|
1979
|
+
),
|
|
1980
|
+
x_prompt_ask,
|
|
1981
|
+
)
|
|
1982
|
+
mcl.add(
|
|
1983
|
+
ins_table_rxs(
|
|
1984
|
+
r'^\s*PROMPT\s+ASK\s+"(?P<question>[^"]+)"\s+SUB\s+(?P<match>~?\w+)(?:\s+DISPLAY\s+',
|
|
1985
|
+
r")?(?:\s+HELP\s+(?P<help>[^\s]+))?\s*$",
|
|
1986
|
+
),
|
|
1987
|
+
x_prompt_ask,
|
|
1988
|
+
)
|
|
1989
|
+
mcl.add(
|
|
1990
|
+
ins_table_rxs(
|
|
1991
|
+
r'^\s*PROMPT\s+ASK\s+"(?P<question>[^"]+)"\s+SUB\s+(?P<match>~?\w+)(?:\s+DISPLAY\s+',
|
|
1992
|
+
r')?(?:\s+HELP\s+"(?P<help>[^"]+)")?\s*$',
|
|
1993
|
+
),
|
|
1994
|
+
x_prompt_ask,
|
|
1995
|
+
)
|
|
1907
1996
|
|
|
1908
1997
|
# ------------------------------------------------------------------
|
|
1909
1998
|
# PROMPT DISPLAY (table viewer)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: execsql2
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.5
|
|
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: Repository, https://github.com/geocoug/execsql
|
|
6
6
|
Project-URL: Issues, https://github.com/geocoug/execsql/issues
|
|
@@ -107,7 +107,7 @@ Description-Content-Type: text/markdown
|
|
|
107
107
|
|
|
108
108
|
> [!NOTE]
|
|
109
109
|
> **This is a maintained fork of [execsql](https://execsql.readthedocs.io/).**
|
|
110
|
-
> The original monolith has been fully refactored into a modular package
|
|
110
|
+
> The original monolith has been fully refactored into a modular package.
|
|
111
111
|
> The CLI and configuration are backwards-compatible with upstream v1.130.1.
|
|
112
112
|
> Report issues at [github.com/geocoug/execsql/issues](https://github.com/geocoug/execsql/issues).
|
|
113
113
|
|
|
@@ -215,8 +215,12 @@ execsql script.sql # read connection from config file
|
|
|
215
215
|
| `-m` | List metacommands and exit |
|
|
216
216
|
| `-n` | Create a new SQLite or PostgreSQL database if it does not exist |
|
|
217
217
|
| `-v {0,1,2,3}` | GUI level (0=none, 1=password, 2=selection, 3=full) |
|
|
218
|
-
| `--gui-framework {tkinter,textual}` | GUI framework for interactive prompts |
|
|
219
218
|
| `-w` | Skip password prompt when a username is supplied |
|
|
219
|
+
| `--dsn URL` | Connection string (e.g. `postgresql://user:pass@host/db`) |
|
|
220
|
+
| `--dry-run` | Parse the script and report commands without executing |
|
|
221
|
+
| `--progress` | Show a progress bar for long-running IMPORT operations |
|
|
222
|
+
| `--dump-keywords` | Print metacommand keywords as JSON and exit |
|
|
223
|
+
| `--gui-framework {tkinter,textual}` | GUI framework for interactive prompts |
|
|
220
224
|
|
|
221
225
|
Run `execsql --help` for the full option list, or `execsql -m` to list all metacommands.
|
|
222
226
|
|
|
@@ -283,8 +287,31 @@ execsql-format --in-place scripts/
|
|
|
283
287
|
execsql-format --check scripts/
|
|
284
288
|
```
|
|
285
289
|
|
|
290
|
+
`execsql-format` is also available as a [pre-commit](https://pre-commit.com/) hook:
|
|
291
|
+
|
|
292
|
+
```yaml
|
|
293
|
+
repos:
|
|
294
|
+
- repo: https://github.com/geocoug/execsql
|
|
295
|
+
rev: v2.4.4
|
|
296
|
+
hooks:
|
|
297
|
+
- id: execsql-format
|
|
298
|
+
args: [--in-place]
|
|
299
|
+
```
|
|
300
|
+
|
|
286
301
|
See the [formatter documentation](https://execsql2.readthedocs.io/en/latest/formatter/) for all options.
|
|
287
302
|
|
|
303
|
+
# VS Code Syntax Highlighting
|
|
304
|
+
|
|
305
|
+
A VS Code extension for execsql syntax highlighting is included in [`extras/vscode-execsql`](extras/vscode-execsql). It injects a TextMate grammar into `.sql` files, adding highlighting for `-- !x!` metacommand markers, keywords (control flow, block, action, directive), variable substitutions (`!!var!!`, `!{var}!`), built-in functions, export formats, and config options — all layered on top of standard SQL highlighting.
|
|
306
|
+
|
|
307
|
+
To install, symlink the extension folder into your VS Code extensions directory:
|
|
308
|
+
|
|
309
|
+
```sh
|
|
310
|
+
ln -s /path/to/execsql/extras/vscode-execsql ~/.vscode/extensions/execsql-syntax
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
See the [extension README](extras/vscode-execsql/README.md) for Windows instructions, color customization, and troubleshooting.
|
|
314
|
+
|
|
288
315
|
# Templates
|
|
289
316
|
|
|
290
317
|
The `templates/` directory in this repository includes ready-to-use execsql scripts:
|
|
@@ -60,7 +60,7 @@ execsql/metacommands/connect.py,sha256=Nsm0D91i3RX-R2rzQQ-Br-gULaI6Uvdn9fqb7DOAV
|
|
|
60
60
|
execsql/metacommands/control.py,sha256=FCIWD-ZivHRZDqMS-2k37iR05HKHsv_7UPh5zJAg4I4,7693
|
|
61
61
|
execsql/metacommands/data.py,sha256=tRQBGTAuW-eJ2tBNWaoZI9OjTyNNyHJISo7gOdL-sm8,11370
|
|
62
62
|
execsql/metacommands/debug.py,sha256=nmfQ2ijUbTQO3drnyV9EzFueGSTfMl-CddP_NlQyI14,8178
|
|
63
|
-
execsql/metacommands/dispatch.py,sha256=
|
|
63
|
+
execsql/metacommands/dispatch.py,sha256=9JrQfaa5d1UzkHg7-gpcOjOM9VdeBlrOeSznzOuHSe8,82029
|
|
64
64
|
execsql/metacommands/io.py,sha256=ON6j_I6tmxXCvHRh0vaXWgFONLHsvt896IrgTWEwmrA,2020
|
|
65
65
|
execsql/metacommands/io_export.py,sha256=kxfGnoBDdPFfncxgz6dazMIoGZEHPOO-Mg02kbpdd20,15965
|
|
66
66
|
execsql/metacommands/io_fileops.py,sha256=RKqbWPTYiwiqCZYG-lpih0w1JVOY4RBFdWr3BJb_pnY,9669
|
|
@@ -85,24 +85,24 @@ execsql/utils/numeric.py,sha256=xh02ANSRk3nUpQ-rtm66ILoMqoi7HtzCoRMIOT9U8QI,1570
|
|
|
85
85
|
execsql/utils/regex.py,sha256=diEzTZqU_HHwVMadPAvN1Vgzhl7I03eVaEFGCXyGGL8,3770
|
|
86
86
|
execsql/utils/strings.py,sha256=5Dvzrk-9SIw2lpxXZQkiJbNyo1sy7iXXAtSULlZ0KG8,8488
|
|
87
87
|
execsql/utils/timer.py,sha256=eDYf5VzCNFk7oo90InJucUm3XcBdhYMogjZMqeg9xzc,1899
|
|
88
|
-
execsql2-2.4.
|
|
89
|
-
execsql2-2.4.
|
|
90
|
-
execsql2-2.4.
|
|
91
|
-
execsql2-2.4.
|
|
92
|
-
execsql2-2.4.
|
|
93
|
-
execsql2-2.4.
|
|
94
|
-
execsql2-2.4.
|
|
95
|
-
execsql2-2.4.
|
|
96
|
-
execsql2-2.4.
|
|
97
|
-
execsql2-2.4.
|
|
98
|
-
execsql2-2.4.
|
|
99
|
-
execsql2-2.4.
|
|
100
|
-
execsql2-2.4.
|
|
101
|
-
execsql2-2.4.
|
|
102
|
-
execsql2-2.4.
|
|
103
|
-
execsql2-2.4.
|
|
104
|
-
execsql2-2.4.
|
|
105
|
-
execsql2-2.4.
|
|
106
|
-
execsql2-2.4.
|
|
107
|
-
execsql2-2.4.
|
|
108
|
-
execsql2-2.4.
|
|
88
|
+
execsql2-2.4.5.data/data/execsql2_extras/README.md,sha256=sxwVyU0ZahCfANv56LahkyuM505kFjrMhe-1SvWE69E,4845
|
|
89
|
+
execsql2-2.4.5.data/data/execsql2_extras/config_settings.sqlite,sha256=aY5cxR7Q7J6zJ4bC9lu5mHUrhy211Cq3MNKPQVCt02E,20480
|
|
90
|
+
execsql2-2.4.5.data/data/execsql2_extras/example_config_prompt.sql,sha256=SY3Jxn1qcVm4kPW9xmmTfknHfvURXmeEYTbRjYrjGSw,7487
|
|
91
|
+
execsql2-2.4.5.data/data/execsql2_extras/execsql.conf,sha256=_45iJ-KWZnB8uMW_gEg067MM5pmGJ-dVl7VbAZMunAE,9530
|
|
92
|
+
execsql2-2.4.5.data/data/execsql2_extras/make_config_db.sql,sha256=WwyC6dK-Eh5CAVppiBCDHqiI1_wEI9U95Ytpr4lsZkg,8726
|
|
93
|
+
execsql2-2.4.5.data/data/execsql2_extras/md_compare.sql,sha256=B8Wd7LZ0vnMY2qvA139JIEBkPObgRH2i5xj6PejTQt8,24092
|
|
94
|
+
execsql2-2.4.5.data/data/execsql2_extras/md_glossary.sql,sha256=DJRHcU5NbFpxTTX-IwH3yRlsboj1q6BBGrUAHKn4Cuo,10796
|
|
95
|
+
execsql2-2.4.5.data/data/execsql2_extras/md_upsert.sql,sha256=v_7GbWh_N1mBTmw3gvTrkagOVp2q0KmXvM8hE-DlFxY,112524
|
|
96
|
+
execsql2-2.4.5.data/data/execsql2_extras/pg_compare.sql,sha256=9dWa8hnfy5dVJI-z2iGpd9JzQmI4j2ziMlEdpnr66ro,24352
|
|
97
|
+
execsql2-2.4.5.data/data/execsql2_extras/pg_glossary.sql,sha256=pKjIIDsROAgJq2H-1qNEcRMAWManivcZ_AEVHzUUlic,9908
|
|
98
|
+
execsql2-2.4.5.data/data/execsql2_extras/pg_upsert.sql,sha256=k7AFiGTLBy3nf-qO5QIaZrEYTAKvdxxU3JDLx9jqkzs,108315
|
|
99
|
+
execsql2-2.4.5.data/data/execsql2_extras/script_template.sql,sha256=1Estacb_vm1FgK41k_G9nuduP1yiA-fQ1Kn4Z4mv5Ao,11153
|
|
100
|
+
execsql2-2.4.5.data/data/execsql2_extras/ss_compare.sql,sha256=TsVxWm3cEpR5-EiMYXNhtaY0arSNeKZhsJdHdLA7xeI,24833
|
|
101
|
+
execsql2-2.4.5.data/data/execsql2_extras/ss_glossary.sql,sha256=cLM7nN8JOIu9ZVP9oY9qdSK3hrnWJiDcX6nZmQQbQWI,13065
|
|
102
|
+
execsql2-2.4.5.data/data/execsql2_extras/ss_upsert.sql,sha256=BCqmBykXBF-BpCgOFeG1qhf2XfScKsxPD17wd1hYfHw,120647
|
|
103
|
+
execsql2-2.4.5.dist-info/METADATA,sha256=CdukkGR7HE8g4_vh1SdY0a1DZlqQtnQwj3ZLnv6seEE,16566
|
|
104
|
+
execsql2-2.4.5.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
105
|
+
execsql2-2.4.5.dist-info/entry_points.txt,sha256=sUOxkM-dN1eBGGpSpDLsAaE0yNXYQKWZAfxPOlMkQyk,90
|
|
106
|
+
execsql2-2.4.5.dist-info/licenses/LICENSE.txt,sha256=LBdhuxejF8_bLCHZ2kWfmDXpDGUu914Gbd6_3JjCRe0,676
|
|
107
|
+
execsql2-2.4.5.dist-info/licenses/NOTICE,sha256=sqVrM73Ys9zfvWC_P797lHfTnoPW_ETeBSrUTFaob0A,339
|
|
108
|
+
execsql2-2.4.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|