execsql2 2.0.1__py3-none-any.whl → 2.1.2__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.
Files changed (90) hide show
  1. execsql/cli.py +322 -108
  2. execsql/config.py +134 -114
  3. execsql/db/access.py +89 -65
  4. execsql/db/base.py +97 -68
  5. execsql/db/dsn.py +45 -29
  6. execsql/db/duckdb.py +4 -5
  7. execsql/db/factory.py +27 -27
  8. execsql/db/firebird.py +30 -18
  9. execsql/db/mysql.py +38 -14
  10. execsql/db/oracle.py +58 -33
  11. execsql/db/postgres.py +68 -28
  12. execsql/db/sqlite.py +36 -27
  13. execsql/db/sqlserver.py +45 -30
  14. execsql/exceptions.py +68 -64
  15. execsql/exporters/__init__.py +1 -1
  16. execsql/exporters/base.py +42 -17
  17. execsql/exporters/delimited.py +60 -59
  18. execsql/exporters/duckdb.py +8 -12
  19. execsql/exporters/feather.py +32 -24
  20. execsql/exporters/html.py +33 -30
  21. execsql/exporters/json.py +18 -17
  22. execsql/exporters/latex.py +11 -13
  23. execsql/exporters/ods.py +50 -46
  24. execsql/exporters/parquet.py +32 -0
  25. execsql/exporters/pretty.py +16 -15
  26. execsql/exporters/raw.py +9 -11
  27. execsql/exporters/sqlite.py +38 -38
  28. execsql/exporters/templates.py +15 -72
  29. execsql/exporters/values.py +13 -12
  30. execsql/exporters/xls.py +26 -26
  31. execsql/exporters/xml.py +12 -12
  32. execsql/exporters/zip.py +0 -3
  33. execsql/gui/__init__.py +2 -2
  34. execsql/gui/console.py +0 -1
  35. execsql/gui/desktop.py +6 -7
  36. execsql/gui/tui.py +8 -14
  37. execsql/importers/base.py +6 -9
  38. execsql/importers/csv.py +10 -17
  39. execsql/importers/feather.py +16 -22
  40. execsql/importers/ods.py +3 -4
  41. execsql/importers/xls.py +5 -6
  42. execsql/metacommands/__init__.py +8 -8
  43. execsql/metacommands/conditions.py +41 -33
  44. execsql/metacommands/connect.py +113 -99
  45. execsql/metacommands/control.py +38 -26
  46. execsql/metacommands/data.py +35 -33
  47. execsql/metacommands/debug.py +13 -9
  48. execsql/metacommands/io.py +288 -229
  49. execsql/metacommands/prompt.py +179 -157
  50. execsql/metacommands/script_ext.py +11 -9
  51. execsql/metacommands/system.py +44 -25
  52. execsql/models.py +9 -16
  53. execsql/parser.py +10 -10
  54. execsql/script.py +183 -157
  55. execsql/state.py +170 -208
  56. execsql/types.py +46 -81
  57. execsql/utils/auth.py +114 -14
  58. execsql/utils/crypto.py +31 -4
  59. execsql/utils/datetime.py +7 -7
  60. execsql/utils/errors.py +34 -29
  61. execsql/utils/fileio.py +90 -55
  62. execsql/utils/gui.py +22 -23
  63. execsql/utils/mail.py +15 -17
  64. execsql/utils/numeric.py +2 -3
  65. execsql/utils/regex.py +9 -12
  66. execsql/utils/strings.py +10 -12
  67. execsql/utils/timer.py +0 -2
  68. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/execsql.conf +1 -1
  69. execsql2-2.1.2.dist-info/METADATA +300 -0
  70. execsql2-2.1.2.dist-info/RECORD +96 -0
  71. execsql2-2.0.1.dist-info/METADATA +0 -406
  72. execsql2-2.0.1.dist-info/RECORD +0 -95
  73. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/READ_ME.rst +0 -0
  74. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/config_settings.sqlite +0 -0
  75. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/example_config_prompt.sql +0 -0
  76. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/make_config_db.sql +0 -0
  77. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/md_compare.sql +0 -0
  78. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/md_glossary.sql +0 -0
  79. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/md_upsert.sql +0 -0
  80. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/pg_compare.sql +0 -0
  81. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/pg_glossary.sql +0 -0
  82. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/pg_upsert.sql +0 -0
  83. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/script_template.sql +0 -0
  84. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/ss_compare.sql +0 -0
  85. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/ss_glossary.sql +0 -0
  86. {execsql2-2.0.1.data → execsql2-2.1.2.data}/data/execsql2_extras/ss_upsert.sql +0 -0
  87. {execsql2-2.0.1.dist-info → execsql2-2.1.2.dist-info}/WHEEL +0 -0
  88. {execsql2-2.0.1.dist-info → execsql2-2.1.2.dist-info}/entry_points.txt +0 -0
  89. {execsql2-2.0.1.dist-info → execsql2-2.1.2.dist-info}/licenses/LICENSE.txt +0 -0
  90. {execsql2-2.0.1.dist-info → execsql2-2.1.2.dist-info}/licenses/NOTICE +0 -0
@@ -1,406 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: execsql2
3
- Version: 2.0.1
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
- Project-URL: Repository, https://github.com/geocoug/execsql2
6
- Project-URL: Issues, https://github.com/geocoug/execsql2/issues
7
- Author-email: Dreas Nielsen <cortice@tutanota.com>
8
- Maintainer-email: Caleb Grant <grantcaleb22@gmail.com>
9
- License: execsql2 — a fork of execsql.py
10
- Copyright (c) 2007-2025 R.Dreas Nielsen
11
- Copyright (c) 2026-present Caleb Grant
12
-
13
- This program is free software: you can redistribute it and/or modify it under
14
- the terms of the GNU General Public License as published by the Free Software
15
- Foundation, either version 3 of the License, or (at your option) any later
16
- version. This program is distributed in the hope that it will be useful, but
17
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19
- details. The GNU General Public License is available at
20
- http://www.gnu.org/licenses/.
21
- License-File: LICENSE.txt
22
- License-File: NOTICE
23
- Keywords: Access,CSV,DBMS,DuckDB,ETL,Firebird,HTML,JSON,LaTeX,MariaDB,MySQL,ODBC,OpenDocument,Oracle,PostgreSQL,Postgres,SQL,SQL Server,SQLite,TSV,XML,database,export,import,query,script,table
24
- Classifier: Development Status :: 5 - Production/Stable
25
- Classifier: Environment :: Console
26
- Classifier: Intended Audience :: End Users/Desktop
27
- Classifier: Intended Audience :: Information Technology
28
- Classifier: Intended Audience :: System Administrators
29
- Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
30
- Classifier: Natural Language :: English
31
- Classifier: Operating System :: OS Independent
32
- Classifier: Programming Language :: Python :: 3
33
- Classifier: Programming Language :: Python :: 3.10
34
- Classifier: Programming Language :: Python :: 3.11
35
- Classifier: Programming Language :: Python :: 3.12
36
- Classifier: Programming Language :: Python :: 3.13
37
- Classifier: Topic :: Database
38
- Classifier: Topic :: Database :: Front-Ends
39
- Requires-Python: >=3.10
40
- Requires-Dist: rich>=13.0
41
- Requires-Dist: sqlglot>=25.0
42
- Requires-Dist: textual>=0.47.0
43
- Requires-Dist: typer>=0.12
44
- Provides-Extra: all
45
- Requires-Dist: duckdb; extra == 'all'
46
- Requires-Dist: jinja2; extra == 'all'
47
- Requires-Dist: odfpy; extra == 'all'
48
- Requires-Dist: openpyxl; extra == 'all'
49
- Requires-Dist: psycopg2-binary; extra == 'all'
50
- Requires-Dist: pymysql; extra == 'all'
51
- Requires-Dist: pyodbc; extra == 'all'
52
- Requires-Dist: xlrd; extra == 'all'
53
- Provides-Extra: dev
54
- Requires-Dist: build>=1.2.2.post1; extra == 'dev'
55
- Requires-Dist: bump-my-version>=1.2.7; extra == 'dev'
56
- Requires-Dist: markdown-include>=0.8; extra == 'dev'
57
- Requires-Dist: mkdocstrings-python>=2.0.3; extra == 'dev'
58
- Requires-Dist: pre-commit>=3.5.0; extra == 'dev'
59
- Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
60
- Requires-Dist: ruff>=0.4; extra == 'dev'
61
- Requires-Dist: tox-uv>=1.13.1; extra == 'dev'
62
- Requires-Dist: twine>=6.1.0; extra == 'dev'
63
- Requires-Dist: zensical>=0.0.28; extra == 'dev'
64
- Provides-Extra: duckdb
65
- Requires-Dist: duckdb; extra == 'duckdb'
66
- Provides-Extra: excel
67
- Requires-Dist: openpyxl; extra == 'excel'
68
- Requires-Dist: xlrd; extra == 'excel'
69
- Provides-Extra: firebird
70
- Requires-Dist: firebird-driver; extra == 'firebird'
71
- Provides-Extra: jinja
72
- Requires-Dist: jinja2; extra == 'jinja'
73
- Provides-Extra: mssql
74
- Requires-Dist: pyodbc; extra == 'mssql'
75
- Provides-Extra: mysql
76
- Requires-Dist: pymysql; extra == 'mysql'
77
- Provides-Extra: odbc
78
- Requires-Dist: pyodbc; extra == 'odbc'
79
- Provides-Extra: ods
80
- Requires-Dist: odfpy; extra == 'ods'
81
- Provides-Extra: oracle
82
- Requires-Dist: oracledb; extra == 'oracle'
83
- Provides-Extra: postgres
84
- Requires-Dist: psycopg2-binary; extra == 'postgres'
85
- Description-Content-Type: text/markdown
86
-
87
- > [!WARNING]
88
- > **This project is in active development and is not yet stable.**
89
- > The codebase is being modernized from the upstream monolith into a modular package.
90
- > APIs, CLI behavior, and configuration options may change without notice.
91
- > Not recommended for production use. For the stable upstream release, see [execsql](https://execsql.readthedocs.io/).
92
-
93
- ![execsql logo](https://execsql2.readthedocs.io/en/latest/_images/execsql_logo_01.png) *Multi-DBMS SQL script processor.*
94
- *execsql.py* is a Python program that runs a SQL script stored in a text file
95
- against a PostgreSQL, MS-Access, SQLite, DuckDB, MS-SQL-Server, MySQL, MariaDB,
96
- Firebird, or Oracle database, or an ODBC DSN. *execsql* also supports a
97
- set of special commands (metacommands) that can import and export data,
98
- copy data between databases, and conditionally execute SQL statements and metacommands.
99
- These metacommands make up a control language that works the same across
100
- all supported database management systems (DBMSs). The metacommands are
101
- embedded in SQL comments, so they will be ignored by other script
102
- processors (e.g., *psql* for Postgres and *sqlcmd* for SQL Server). The
103
- metacommands make up a toolbox that can be used to create both automated
104
- and interactive data processing applications.
105
-
106
- The program's features and requirements are summarized below.
107
- Complete documentation is available at
108
- [https://execsql2.readthedocs.io/](https://execsql2.readthedocs.io/).
109
-
110
- [![Downloads](https://pepy.tech/badge/execsql2)](https://pypi.org/project/execsql2/)
111
- [![Downloads](https://pepy.tech/badge/execsql2/month)](https://pepy.tech/project/execsql2/)
112
-
113
- # Fork
114
-
115
- *execsql2* is a fork of [execsql](https://execsql.readthedocs.io/) originally authored by R.Dreas Nielsen.
116
- The original source is available at [https://execsql.readthedocs.io/](https://execsql.readthedocs.io/).
117
- This fork is maintained by [Caleb Grant](https://github.com/geocoug).
118
-
119
- # Capabilities
120
-
121
- You can use *execsql* to:
122
-
123
- - Import data from text files or spreadsheets into
124
- a database.
125
- - Copy data between different databases, even databases using different
126
- types of DBMSs.
127
- - Export tables and views as formatted text, comma-separated values (CSV), tab-separated
128
- values (TSV), OpenDocument spreadsheets, HTML tables, JSON, XML, LaTeX tables, HDF5
129
- tables, unformatted (e.g., binary) data, or several other formats.
130
- - Export data to non-tabular formats using several different
131
- template processors.
132
- - Display a table or view in a GUI dialog,
133
- optionally allowing the user to select a data row, enter a data
134
- value, or respond to a prompt.
135
- - Display a pair of tables or views in a GUI dialog, allowing the user
136
- to compare data and find rows with matching or non-matching key values.
137
- - Conditionally execute different SQL commands and metacommands based on the DBMS in use,
138
- the database in use, data values, user input, and other conditions.
139
- - Execute blocks of SQL statements or *execsql* metacommands repeatedly, using
140
- any of three different looping methods.
141
- - Use simple dynamically-created data entry forms to get user input.
142
- - Write status or informational messages to the console or to a file
143
- during the processing of a SQL script. Status messages and data exported in
144
- text format can be combined in a single text file. Data tables can be
145
- exported in a text format that is compatible with Markdown pipe tables,
146
- so that script output can be converted into a variety of document formats.
147
- - Write more modular and maintainable SQL code by factoring repeated
148
- code out into separate scripts, parameterizing the code using
149
- substitution variables, and using the INCLUDE or SCRIPT metacommands
150
- to merge the modules into a single stream of commands.
151
- - Merge multiple elements of a workflow—e.g., data loading, summarization, and
152
- reporting—into a single script for better coupling of related steps and more
153
- secure maintenance.
154
- - Use *execsql* as a CGI script for a web application that needs to run
155
- SQL scripts and return database output.
156
-
157
- Standard SQL provides no features for interacting with external files or
158
- with the user, or for controlling the flow of actions to be carried out
159
- based either on data or on user input. Some DBMSs provide these features,
160
- but capabilities and syntax differ between DBMSs. *execsql* provides
161
- these features in a way that operates identically across all supported
162
- DBMSs on both Linux and Windows.
163
-
164
- *execsql* is inherently a command-line program that can operate in a completely
165
- non-interactive mode (except for password prompts). Therefore, it is suitable
166
- for incorporation into a toolchain controlled by a shell script (on Linux),
167
- batch file (on Windows), or other system-level scripting application. When
168
- used in this mode, the only interactive elements will be password prompts.
169
- However, several metacommands generate interactive prompts and data
170
- displays, so *execsql* scripts can be written to provide some user interactivity.
171
-
172
- In addition, *execsql* automatically maintains a log that documents key
173
- information about each run of the program, including the databases that are
174
- used, the scripts that are run, and the user's choices in response to
175
- interactive prompts. Together, the script and the log provide documentation
176
- of all actions carried out that may have altered data.
177
-
178
- The documentation includes 30 examples showing the use of
179
- *execsql*'s metacommands, in both simple and complex scripts.
180
-
181
- # An Illustration
182
-
183
- The following code illustrates the use of metacommands and substitution variables.
184
- Lines starting with "-- !x!" are metacommands that implement *execsql*-specific features.
185
- Identifiers enclosed in pairs of exclamation points (!!) are substitution variables
186
- that have been defined with the SUB metacommand. The "$date_tag" variable is
187
- a substitution variable that is defined by *execsql* itself rather than by the user.
188
-
189
- ```
190
- -- ==== Configuration ====
191
- -- Put the (date-tagged) logfile name in the 'inputfile' substitution variable.
192
- -- !x! SUB inputfile logs/errors_!!$date_tag!!
193
- -- Ensure that the export directory will be created if necessary.
194
- -- !x! CONFIG MAKE_EXPORT_DIRS Yes
195
-
196
- -- ==== Display Fatal Errors ====
197
- -- !x! IF(file_exists(!!inputfile!!))
198
- -- Import the data to a staging table.
199
- -- !x! IMPORT TO REPLACEMENT staging.errorlog FROM !!inputfile!!
200
- -- Create a view to display only fatal errors.
201
- create temporary view fatals as
202
- select user, run_time, process
203
- from staging.errorlog
204
- where severity = 'FATAL';
205
- -- !x! IF(HASROWS(fatals))
206
- -- Export the fatal errors to a dated report.
207
- -- !x! EXPORT fatals TO reports/error_report_!!$date_tag!! AS CSV
208
- -- Also display it to the user in a GUI.
209
- -- !x! PROMPT MESSAGE "Fatal errors in !!inputfile!!:" DISPLAY fatals
210
- -- !x! ELSE
211
- -- !x! WRITE "There are no fatal errors."
212
- -- !x! ENDIF
213
- -- !x! ELSE
214
- -- !x! WRITE "There is no error log."
215
- -- !x! ENDIF
216
- drop table if exists staging.errorlog cascade;
217
- ```
218
-
219
- The IMPORT metacommand reads the specified file and loads the data into
220
- the target (staging) table, automatically choosing appropriate data types
221
- for each column. The EXPORT metacommand saves the data in a CSV file
222
- that can be used by other applications. The PROMPT metacommand produces
223
- a GUI display of the data as follows:
224
-
225
- ![PROMPT display of 'fatals' view](https://execsql.readthedocs.io/en/latest/_images/fatals.png)
226
-
227
- The complete documentation includes additional examples.
228
-
229
- # Requirements
230
-
231
- The *execsql* program uses third-party Python libraries to communicate with
232
- different database and spreadsheet software. These libraries must be
233
- installed to use those programs with *execsql*. Only those libraries that
234
- are needed, based on the command line arguments and metacommands, must
235
- be installed. The libraries required for each database or spreadsheet
236
- application are:
237
-
238
- - PosgreSQL: psycopg2.
239
- - MariaDB or MySQL: pymysql.
240
- - SQL Server: pydobc.
241
- - DuckDB: duckdb.
242
- - Firebird: fdb.
243
- - MS-Access: pydobc and pywin32.
244
- - Oracle: cx-Oracle.
245
- - DSN connections: pyodbc.
246
- - OpenDocument spreadsheets: odfpy.
247
- - Excel spreadsheets (read only): xlrd and openpyxl.
248
-
249
- Connections to SQLite databases are made using Python's standard library,
250
- so no additional software is needed.
251
-
252
- If the Jinja or Airspeed template processors will be used, those software
253
- libraries must also be installed.
254
-
255
- All of these libraries can be installed from the Python Package Index (PyPI)
256
- using *pip*.
257
-
258
- # Syntax and Options
259
-
260
- Different forms of command lines, with varying arguments and options, are shown below.
261
-
262
- ## Commands
263
-
264
- ```
265
- execsql.py -ta [other options] sql_script_file Access_db
266
-
267
- execsql.py -tf [other options] sql_script_file Firebird_host Firebird_db
268
-
269
- execsql.py -tm [other options] sql_script_file MySQL_host MySQL_db
270
-
271
- execsql.py -tp [other options] sql_script_file Postgres_host Postgres_db
272
-
273
- execsql.py -ts [other options] sql_script_file SQL_Server_host SQL_Server_db
274
-
275
- execsql.py -to [other options] sql_script_file Oracle_host Oracle_service
276
-
277
- execsql.py -tl [other options] sql_script_file SQLite_db
278
-
279
- execsql.py -tl [other options] sql_script_file DuckDB_db
280
-
281
- execsql.py -tl [other options] sql_script_file DSN_name
282
- ```
283
-
284
- Most arguments and options can also be specified in a configuration file, so
285
- only the script file name need be specified on the command line.
286
-
287
- ```
288
- execsql.py sql_script_file
289
- ```
290
-
291
- ## Command-line Arguments
292
-
293
- ```
294
- sql_script_file The name of a text file of SQL commands to be executed. Required argument.
295
-
296
- Access_db The name of the Access database against which to run the SQL.
297
-
298
- DSN_name The data set name for an ODBC connection.
299
-
300
- Firebird_db The name of the Firebird database against which to run the SQL.
301
-
302
- Firebird_host The name of the Firebird host (server) against which to run the SQL.
303
-
304
- MySQL_db The name of the MySQL database against which to run the SQL.
305
-
306
- MySQL_host The name of the MySQL host (server) against which to run the SQL.
307
-
308
- Oracle_host The name of the Oracle host (server) against which to run the SQL.
309
-
310
- Oracle_service The Oracle service name (database) against which to run the SQL.
311
-
312
- Postgres_db The name of the Postgres database against which to run the SQL.
313
-
314
- Postgres_host The name of the Postgres host (server) against which to run the SQL.
315
-
316
- SQL_Server_db The name of the SQL Server database against which to run the SQL.
317
-
318
- SQL_Server_host The name of the SQL Server host (server) against which to run the SQL.
319
-
320
- SQLite_db The name of the SQLite database against which to run the SQL.
321
-
322
- DuckDB_db The name of the DuckDB database against which to run the SQL.
323
- ```
324
-
325
- ## Command-line Options
326
-
327
- ```
328
- -a value Define the replacement for a substitution variable $ARG_x.
329
- -d value Automatically make directories used by the EXPORT
330
- metacommand: 'n'-no (default); 'y'-yes.
331
- -e value Character encoding of the database. Only used for some
332
- database types.
333
- -f value Character encoding of the script file.
334
- -g value Character encoding to use for output of the WRITE and EXPORT
335
- metacommands.
336
- -i value Character encoding to use for data files imported with the
337
- IMPORT metacommand.
338
- -l Use execsql.log in the user's home directory.
339
- -m Display the allowable metacommands, and exit.
340
- -p value The port number to use for client-server databases.
341
- -s value The number of lines of an IMPORTed file to scan to diagnose
342
- the quote and delimiter characters.
343
- -t value Type of database:
344
- 'p'-Postgres,
345
- 'f'-Firebird,
346
- 'l'-SQLite,
347
- 'k'-DuckDB,
348
- 'm'-MySQL or MariaDB,
349
- 'a'-Access,
350
- 's'-SQL Server,
351
- 'o'-Oracle,
352
- 'd'-DSN connection.
353
- -u value The database user name (optional).
354
- -v value Use a GUI for interactive prompts.
355
- -w Do not prompt for the password when the user is specified.
356
- -y List all valid character encodings and exit.
357
- -z value Buffer size, in kb, to use with the IMPORT metacommand
358
- (the default is 32).
359
- ```
360
-
361
- # Documentation, Tools, and Templates
362
-
363
- Complete documentation is at [Read the Docs](https://execsql.readthedocs.io/)
364
-
365
- Tools that are installed with *execsql*, that illustrate various uses, and that are useful in their
366
- own right, are:
367
-
368
- - Upsert scripts): A set of *execsql* scripts for
369
- Postgres, MariaDB/MySQL, and SQL Server that will perform a merge (upsert) operation
370
- on multiple tables simultaneously, automatically ordering the tables according to
371
- foreign key constraints, and performing null, primary key, and foreign key data
372
- integrity checks. These scripts use the *information_schema* views and so operate
373
- on any set of tables in any supported DBMS without customization.
374
- - Staging table comparison scripts: A set of *execsql*
375
- scripts for Postgres, MariaDB/MySQL, and SQL Server that will perform various comparisons
376
- of the data in a staging table to the data in the corresponding base table. These scripts
377
- use the *information_schema* views and so operate on any table in any supported DBMS
378
- without customization.
379
- - Glossary creation script: An *execsql* script that
380
- will produce a table of terms (e.g., column names) and definitions, and that may be useful
381
- to accompany a database export.
382
-
383
- The set of script templates that are also installed include several types of templates that may be useful in conjunction with *execsql.py*. These are:
384
-
385
- - *execsql.conf*: An annotated version of the configuration file that includes all
386
- configuration settings and notes on their usage.
387
- - *script_template.sql*: A framework for SQL scripts that make use of several *execsql*
388
- features. It includes sections for custom configuration settings, custom logfile creation,
389
- and reporting of unexpected script exits (through user cancellation or errors).
390
- - *config_settings.sqlite* and *example_config_prompt.sql*: A SQLite database containing
391
- specifications for all settings configurable with the CONFIG metacommand, in the form
392
- used by the PROMPT ENTRY_FORM metacommand, and a SQL script illustrating how this database can be used to prompt the user for some or all of the configuration settings.
393
-
394
- # Copyright and License
395
-
396
- Copyright (c) 2007-2025 R.Dreas Nielsen
397
- Copyright (c) 2026-present Caleb Grant
398
-
399
- This program is free software: you can redistribute it and/or modify it under
400
- the terms of the GNU General Public License as published by the Free Software
401
- Foundation, either version 3 of the License, or (at your option) any later
402
- version. This program is distributed in the hope that it will be useful, but
403
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
404
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
405
- details. The GNU General Public License is available at
406
- <http://www.gnu.org/licenses/>.
@@ -1,95 +0,0 @@
1
- execsql/__init__.py,sha256=BIny4bL8uHuSl3gXPqEkIB2FtcexlARjR7IYPwtD9bM,486
2
- execsql/__main__.py,sha256=HdbK-SAhyUmfB6xINY5AzxdMSxGzWSGEG_2dv42Jn64,315
3
- execsql/cli.py,sha256=Tq2lRyNwmsAcHJBDGy1I8bEq0hg6eKMrUvsw_Adjigk,32657
4
- execsql/config.py,sha256=uYGoJqFP6_4H3-RzXcQ3OvSOGKJfz4Sy9iSHc5p2L3M,31706
5
- execsql/constants.py,sha256=up8I1sfFg1KaQ-ZgwufDOYbupMgTkPVpHzAdWpi5-BQ,12628
6
- execsql/exceptions.py,sha256=4Cp0GAN2Kx3u_SrFZ4ZbNmZxKD-CyTRsB06PYAWtyG4,7103
7
- execsql/format.py,sha256=4uNF2MSDBYwZuK9k4wywcUZFU4D_9bMokseOyaCjmGU,11911
8
- execsql/models.py,sha256=ccazU1nnwkgsmU4bJqG314TW6e4aAxUShaVFOlQDnXQ,12560
9
- execsql/parser.py,sha256=AbJMWfXPJLX8Gn64b_3aeJuktDKEUQx8FutO0noPJiY,12732
10
- execsql/script.py,sha256=UBZfWSWvoZ-ioYtHi1bvo8JXyvbLhI1A0khRePuJzTQ,45600
11
- execsql/state.py,sha256=UF5M9qJAt2Iclw9e4FRClvYP1BqF59VQHNdCRUm04fA,13257
12
- execsql/types.py,sha256=co5gQD4jmBKLgKgAWzGJIXOCLA2yStRKWWR-69tC2Wg,30259
13
- execsql/db/__init__.py,sha256=jTbuafuKOqYtXFR1wvCOoKK5Lr3l1uErfaIbIr6UywI,1063
14
- execsql/db/access.py,sha256=PHdrDdQT17h9frWAjPDS9m0cVZoBCFh0T2DdHcoWVTI,14937
15
- execsql/db/base.py,sha256=jUq6Q11Qsp1PRUr1P20IFLHLkCUjQU7tgq5V71OsXuI,22431
16
- execsql/db/dsn.py,sha256=QSxLn1fsSxB9boVO-CCM-ThUtlKl2ozESfJK5IKSxoA,4373
17
- execsql/db/duckdb.py,sha256=mivs9BQnmt-Zi0K4EX2Z0Xyf5fDcgtoL0EYnOAJsz4Q,2749
18
- execsql/db/factory.py,sha256=PP3PPlRljzjxHfekvRryR7MAs2PF2tGiEwoNv8v27YM,4177
19
- execsql/db/firebird.py,sha256=iP0dpPj8LfwBMcvy5vPI3i4B_bJ6EZ9naxnxNw0I9B0,6880
20
- execsql/db/mysql.py,sha256=DRMrTW3RIpJrvWwEYcoNEDuIiAxO1T-PvZ6kIcRBS-Q,11596
21
- execsql/db/oracle.py,sha256=nRFGN57wyjVPAFkJxnJ-mhT9eUua7H__HHcLllms8WA,8297
22
- execsql/db/postgres.py,sha256=eVAElVLXwqZArBMsfYsASG21C_bQb_9TU5dTwx9VWZ4,16977
23
- execsql/db/sqlite.py,sha256=3aE9BM__7QCP6D4_j72GjH11STp8uJHJJMSB5V3-Xmc,8641
24
- execsql/db/sqlserver.py,sha256=EkNDdsNo4weJRzoy_4jUJiL1QFLY-b5oHDV0xV1SlrI,5971
25
- execsql/exporters/__init__.py,sha256=AUV1zl5tNfhhIo9Fv8Ps2aqWx3rPd0nwmOdumf7cypQ,512
26
- execsql/exporters/base.py,sha256=xJhJ5v_VdKNk5vJwURH01AYUlmrFdbbH9IU84j_ELEU,4754
27
- execsql/exporters/delimited.py,sha256=KJPdFKDb5mqPFLyOEkoY1Dh8p99mylKNFszCd-4laAs,26903
28
- execsql/exporters/duckdb.py,sha256=1JLJiMVLFG2zyD8Y2xaH4JlZpcYtfQQvY9khcCK_H-U,2844
29
- execsql/exporters/feather.py,sha256=TvJF-qAf5MvGWr8n0kfSuy2p-vU7CHiNHoKisieeMa8,3688
30
- execsql/exporters/html.py,sha256=0k9SOw_KBAvws7gDCKlAPeqp4cF38MnJ-SNoj_X5WWU,8153
31
- execsql/exporters/json.py,sha256=uhWYDZQ9k0Di84t5XCv21fqp5fK7OmAneNXgHV0cIFk,3577
32
- execsql/exporters/latex.py,sha256=8essYg8Gtr6CxSXSd2p_5aoQklb-hBBLvhcKnivT9nM,4139
33
- execsql/exporters/ods.py,sha256=8XtCV4yWfi-OmHAAsbBlpMtxB7shJmR589KmNnzgH_I,16837
34
- execsql/exporters/pretty.py,sha256=pnhzHBQb0-qplEiPyvoW81IoyhgunQjJiDnrgu-3ApY,3043
35
- execsql/exporters/raw.py,sha256=SodF12-4Ghjk4iws9IwtK6lnM7oZRDaninfKClwKeM0,1604
36
- execsql/exporters/sqlite.py,sha256=ZtM3pAMNoC2OSTv4jv0AulBQ1dzBQrNwfSWJ-GYJgOg,2366
37
- execsql/exporters/templates.py,sha256=dCyHmHTYNuo7oE4E-Nv-bILcY6vyukDeDF_UkkmbBak,6762
38
- execsql/exporters/values.py,sha256=FVRYtutQIfdyoe7xc6yqrV0P4wKylL9dabuBbM6bxwM,2105
39
- execsql/exporters/xls.py,sha256=7tFmzQPsJDNBO9Umv4tTAhBd03DnAZbVudlIo2FXh7g,8914
40
- execsql/exporters/xml.py,sha256=v4Mx0szqQMTcb8Cv0bkUFvizava3caEBjISsn6fUmj4,1680
41
- execsql/exporters/zip.py,sha256=jUFzUxLj-TEp1R0dA0ehq4GXj_hEpWs5bnQbivdEu9A,3511
42
- execsql/gui/__init__.py,sha256=-dxASXTHFA2FPW4V0BE_9QZss9tmtAPLRUmbWF1eMeg,2007
43
- execsql/gui/base.py,sha256=gbfCqj3nOMkAcn-GNIIAy7RdPFJ0UMbzOxpDpfoEVxk,6042
44
- execsql/gui/console.py,sha256=3Ais4YEv-M0Crpb_rZnPGGlXhdvILaORd6vKWXLMt9E,14315
45
- execsql/gui/desktop.py,sha256=BRvpvfI6Vf3qxGmQRFILC--i7gSyxEH10klkwuqcT3w,42016
46
- execsql/gui/tui.py,sha256=VmIkYumvgs0K1mQKUwch4wR6Lfv3iMHRGTACnXmTfR4,46024
47
- execsql/importers/__init__.py,sha256=dDsxSVeQYXBvm9yGqN3QswyGbLWTwt08pvUuRJgZhl4,289
48
- execsql/importers/base.py,sha256=keqdjFIB3_sQ0MYlyODcIYREhMkKsaaJLSmIRtWRioo,4025
49
- execsql/importers/csv.py,sha256=BooCQuy4_8vCjOWsdCOmkHpLGR9msNMR0HbnluyfLKI,4779
50
- execsql/importers/feather.py,sha256=CbkT73tT2a2grUJrY6s2xagLk3GOgJvHAAa8EEZQc0o,1922
51
- execsql/importers/ods.py,sha256=hf2u3UBUZdyFVPmee27JwJ5G2oLkZIJi8Nn4zD_4uc4,2740
52
- execsql/importers/xls.py,sha256=ZAun7i-MvVAPyKP5wJgo2-I0YMBWxluKPRFhVQZmYBA,3578
53
- execsql/metacommands/__init__.py,sha256=EpUmdO1o9G8zSkvVk-H3lt0KxIx_HzXjN8qyWZHoLLQ,65017
54
- execsql/metacommands/conditions.py,sha256=t08gzBjz9MR99jEH5LfZlCGZhKNOKim6Q5JiThSznr8,22178
55
- execsql/metacommands/connect.py,sha256=doVc3gAgAT8_S-qFE1I7iLtRmM379ioHd1tpwm1gUBg,14872
56
- execsql/metacommands/control.py,sha256=D43NslP6e3op9pjKs9S3JMxaVjnMbZ8VIdrywlc_gZE,7430
57
- execsql/metacommands/data.py,sha256=TTGio4_n3s1cf72qox36FGcZ4vIJcZHHr828yLW0CIw,11401
58
- execsql/metacommands/debug.py,sha256=4r_J0OR8LlYCV_uiaOIMF-53nBl8dQ7_eSKzqwq-DzA,7953
59
- execsql/metacommands/io.py,sha256=0wB7kwUb9wfDn2SLPP0RiY7j_Ayi4wDvYmDGDwI6duE,43199
60
- execsql/metacommands/prompt.py,sha256=I-opZUcfOOq3wqQyUHV0WB8U8WkPpqOLbd47HmAbvMk,38623
61
- execsql/metacommands/script_ext.py,sha256=K8VeKW56YABgDozYH4na9hBIU-EISkNMXsx_eMPT1zc,2218
62
- execsql/metacommands/system.py,sha256=_r_Mab5t_HeA5Gnh4akDZ-Tjr_kBEMAVeEWTi8N93XU,6715
63
- execsql/utils/__init__.py,sha256=0uR6JwVJQRX3vceByNBduCAf5dd5assKjeqJUWvpZoA,278
64
- execsql/utils/auth.py,sha256=J3n-HAX5Wc9CF4woP9do6c0kzFxKqPSJWduim0Jcke4,3449
65
- execsql/utils/crypto.py,sha256=tDrnPYZhefWs4v5WZX4U1F8jSlnlqsVflbfLcm_dBsA,1992
66
- execsql/utils/datetime.py,sha256=QKSH9RjEJgUcrgoFFtX1qSR9VeE5YmeG9m6r0raPY7Q,7658
67
- execsql/utils/errors.py,sha256=K-u9ZYQGZSoLs3D3dI5PVpQ5GRhwRgQC6OL3hAtivys,5797
68
- execsql/utils/fileio.py,sha256=xf1NRdOZ12pGg6onfxWrlHM4nmpF2iwVLE9oCg87eCg,21764
69
- execsql/utils/gui.py,sha256=fxxj0y3u6Qh9zRBVtgkN-M5_i-dOzGe54MtDq91KuVo,16764
70
- execsql/utils/mail.py,sha256=_b_HcJR9xIZL8SfSZr4NnZxmFriGSfvm64Q8XYYWONk,5654
71
- execsql/utils/numeric.py,sha256=ZZ5p0PEuDMT1JdNHhOwUQwa47zovpWeY8HWUiYdNU10,1562
72
- execsql/utils/regex.py,sha256=V4etoivXXdkMDMv2Wzu6WvcmbnnjnrH6A8gQfT1MrTQ,3683
73
- execsql/utils/strings.py,sha256=NsxKkyf1Q8Re6mFObpI_0pWB29BmZ30tqJEwgd1J4rE,8266
74
- execsql/utils/timer.py,sha256=V3AA3Sqi71lowtWJwlTBXNzZVtqpsTvG3aTe5GbBxjE,1917
75
- execsql2-2.0.1.data/data/execsql2_extras/READ_ME.rst,sha256=xrseluXaBIw0mec1J5rcNVKIgOqHRCJcbGrCsAay7UI,4848
76
- execsql2-2.0.1.data/data/execsql2_extras/config_settings.sqlite,sha256=aY5cxR7Q7J6zJ4bC9lu5mHUrhy211Cq3MNKPQVCt02E,20480
77
- execsql2-2.0.1.data/data/execsql2_extras/example_config_prompt.sql,sha256=SY3Jxn1qcVm4kPW9xmmTfknHfvURXmeEYTbRjYrjGSw,7487
78
- execsql2-2.0.1.data/data/execsql2_extras/execsql.conf,sha256=pFV4LIY5jLecMkUoJhqjj4FTq0TS5X7gGvM7CbjcEU8,9528
79
- execsql2-2.0.1.data/data/execsql2_extras/make_config_db.sql,sha256=WwyC6dK-Eh5CAVppiBCDHqiI1_wEI9U95Ytpr4lsZkg,8726
80
- execsql2-2.0.1.data/data/execsql2_extras/md_compare.sql,sha256=B8Wd7LZ0vnMY2qvA139JIEBkPObgRH2i5xj6PejTQt8,24092
81
- execsql2-2.0.1.data/data/execsql2_extras/md_glossary.sql,sha256=DJRHcU5NbFpxTTX-IwH3yRlsboj1q6BBGrUAHKn4Cuo,10796
82
- execsql2-2.0.1.data/data/execsql2_extras/md_upsert.sql,sha256=v_7GbWh_N1mBTmw3gvTrkagOVp2q0KmXvM8hE-DlFxY,112524
83
- execsql2-2.0.1.data/data/execsql2_extras/pg_compare.sql,sha256=9dWa8hnfy5dVJI-z2iGpd9JzQmI4j2ziMlEdpnr66ro,24352
84
- execsql2-2.0.1.data/data/execsql2_extras/pg_glossary.sql,sha256=pKjIIDsROAgJq2H-1qNEcRMAWManivcZ_AEVHzUUlic,9908
85
- execsql2-2.0.1.data/data/execsql2_extras/pg_upsert.sql,sha256=k7AFiGTLBy3nf-qO5QIaZrEYTAKvdxxU3JDLx9jqkzs,108315
86
- execsql2-2.0.1.data/data/execsql2_extras/script_template.sql,sha256=1Estacb_vm1FgK41k_G9nuduP1yiA-fQ1Kn4Z4mv5Ao,11153
87
- execsql2-2.0.1.data/data/execsql2_extras/ss_compare.sql,sha256=TsVxWm3cEpR5-EiMYXNhtaY0arSNeKZhsJdHdLA7xeI,24833
88
- execsql2-2.0.1.data/data/execsql2_extras/ss_glossary.sql,sha256=cLM7nN8JOIu9ZVP9oY9qdSK3hrnWJiDcX6nZmQQbQWI,13065
89
- execsql2-2.0.1.data/data/execsql2_extras/ss_upsert.sql,sha256=BCqmBykXBF-BpCgOFeG1qhf2XfScKsxPD17wd1hYfHw,120647
90
- execsql2-2.0.1.dist-info/METADATA,sha256=XglSs2oiPe5GaKTxgr5hj1MaK018u3BVZVcNKwH8K1o,19450
91
- execsql2-2.0.1.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
92
- execsql2-2.0.1.dist-info/entry_points.txt,sha256=sUOxkM-dN1eBGGpSpDLsAaE0yNXYQKWZAfxPOlMkQyk,90
93
- execsql2-2.0.1.dist-info/licenses/LICENSE.txt,sha256=LBdhuxejF8_bLCHZ2kWfmDXpDGUu914Gbd6_3JjCRe0,676
94
- execsql2-2.0.1.dist-info/licenses/NOTICE,sha256=sqVrM73Ys9zfvWC_P797lHfTnoPW_ETeBSrUTFaob0A,339
95
- execsql2-2.0.1.dist-info/RECORD,,