execsql2 2.4.5__py3-none-any.whl → 2.6.0__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 (62) hide show
  1. execsql/cli/__init__.py +14 -0
  2. execsql/cli/dsn.py +2 -0
  3. execsql/cli/help.py +2 -0
  4. execsql/cli/run.py +4 -2
  5. execsql/constants.py +11 -0
  6. execsql/db/access.py +20 -0
  7. execsql/db/base.py +4 -0
  8. execsql/db/dsn.py +11 -8
  9. execsql/db/duckdb.py +12 -8
  10. execsql/db/firebird.py +17 -8
  11. execsql/db/mysql.py +13 -8
  12. execsql/db/oracle.py +22 -8
  13. execsql/db/postgres.py +21 -9
  14. execsql/db/sqlite.py +18 -8
  15. execsql/db/sqlserver.py +14 -8
  16. execsql/exporters/__init__.py +6 -1
  17. execsql/exporters/base.py +2 -0
  18. execsql/exporters/delimited.py +10 -0
  19. execsql/exporters/protocol.py +128 -0
  20. execsql/exporters/xls.py +8 -0
  21. execsql/format.py +3 -1
  22. execsql/gui/__init__.py +2 -0
  23. execsql/gui/base.py +2 -0
  24. execsql/gui/console.py +2 -0
  25. execsql/gui/desktop.py +1 -0
  26. execsql/gui/tui.py +134 -0
  27. execsql/importers/base.py +1 -0
  28. execsql/importers/csv.py +2 -0
  29. execsql/importers/feather.py +2 -0
  30. execsql/importers/ods.py +1 -0
  31. execsql/importers/xls.py +1 -0
  32. execsql/metacommands/__init__.py +386 -180
  33. execsql/metacommands/dispatch.py +2 -0
  34. execsql/metacommands/io.py +41 -0
  35. execsql/models.py +17 -0
  36. execsql/parser.py +41 -0
  37. execsql/script/control.py +2 -0
  38. execsql/script/engine.py +19 -0
  39. execsql/script/variables.py +9 -5
  40. execsql/state.py +312 -199
  41. execsql/types.py +46 -0
  42. {execsql2-2.4.5.dist-info → execsql2-2.6.0.dist-info}/METADATA +2 -2
  43. {execsql2-2.4.5.dist-info → execsql2-2.6.0.dist-info}/RECORD +62 -61
  44. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/README.md +0 -0
  45. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/config_settings.sqlite +0 -0
  46. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/example_config_prompt.sql +0 -0
  47. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/execsql.conf +0 -0
  48. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/make_config_db.sql +0 -0
  49. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/md_compare.sql +0 -0
  50. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/md_glossary.sql +0 -0
  51. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/md_upsert.sql +0 -0
  52. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/pg_compare.sql +0 -0
  53. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/pg_glossary.sql +0 -0
  54. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/pg_upsert.sql +0 -0
  55. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/script_template.sql +0 -0
  56. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/ss_compare.sql +0 -0
  57. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/ss_glossary.sql +0 -0
  58. {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/ss_upsert.sql +0 -0
  59. {execsql2-2.4.5.dist-info → execsql2-2.6.0.dist-info}/WHEEL +0 -0
  60. {execsql2-2.4.5.dist-info → execsql2-2.6.0.dist-info}/entry_points.txt +0 -0
  61. {execsql2-2.4.5.dist-info → execsql2-2.6.0.dist-info}/licenses/LICENSE.txt +0 -0
  62. {execsql2-2.4.5.dist-info → execsql2-2.6.0.dist-info}/licenses/NOTICE +0 -0
@@ -10,207 +10,413 @@ Handler functions live in the sibling modules:
10
10
 
11
11
  from __future__ import annotations
12
12
 
13
- import execsql.state as _state # noqa: F401
13
+ import execsql.state as _state
14
14
 
15
15
  # Handler imports — grouped by module for readability.
16
16
  from execsql.metacommands.connect import (
17
- x_connect_pg, # noqa: F401
18
- x_connect_user_pg, # noqa: F401
19
- x_connect_ssvr, # noqa: F401
20
- x_connect_user_ssvr, # noqa: F401
21
- x_connect_mysql, # noqa: F401
22
- x_connect_user_mysql, # noqa: F401
23
- x_connect_access, # noqa: F401
24
- x_connect_fb, # noqa: F401
25
- x_connect_user_fb, # noqa: F401
26
- x_connect_ora, # noqa: F401
27
- x_connect_user_ora, # noqa: F401
28
- x_connect_duckdb, # noqa: F401
29
- x_connect_sqlite, # noqa: F401
30
- x_connect_dsn, # noqa: F401
31
- x_use, # noqa: F401
32
- x_disconnect, # noqa: F401
33
- x_autocommit_on, # noqa: F401
34
- x_autocommit_off, # noqa: F401
35
- x_pg_vacuum, # noqa: F401
36
- x_daoflushdelay, # noqa: F401
17
+ x_connect_pg,
18
+ x_connect_user_pg,
19
+ x_connect_ssvr,
20
+ x_connect_user_ssvr,
21
+ x_connect_mysql,
22
+ x_connect_user_mysql,
23
+ x_connect_access,
24
+ x_connect_fb,
25
+ x_connect_user_fb,
26
+ x_connect_ora,
27
+ x_connect_user_ora,
28
+ x_connect_duckdb,
29
+ x_connect_sqlite,
30
+ x_connect_dsn,
31
+ x_use,
32
+ x_disconnect,
33
+ x_autocommit_on,
34
+ x_autocommit_off,
35
+ x_pg_vacuum,
36
+ x_daoflushdelay,
37
37
  )
38
38
  from execsql.metacommands.control import (
39
- x_if, # noqa: F401
40
- x_if_orif, # noqa: F401
41
- x_if_andif, # noqa: F401
42
- x_if_elseif, # noqa: F401
43
- x_if_else, # noqa: F401
44
- x_if_block, # noqa: F401
45
- x_if_end, # noqa: F401
46
- x_loop, # noqa: F401
47
- x_halt, # noqa: F401
48
- x_halt_msg, # noqa: F401
49
- x_error_halt, # noqa: F401
50
- x_metacommand_error_halt, # noqa: F401
51
- x_begin_batch, # noqa: F401
52
- x_end_batch, # noqa: F401
53
- x_rollback, # noqa: F401
54
- x_break, # noqa: F401
55
- x_wait_until, # noqa: F401
39
+ x_if,
40
+ x_if_orif,
41
+ x_if_andif,
42
+ x_if_elseif,
43
+ x_if_else,
44
+ x_if_block,
45
+ x_if_end,
46
+ x_loop,
47
+ x_halt,
48
+ x_halt_msg,
49
+ x_error_halt,
50
+ x_metacommand_error_halt,
51
+ x_begin_batch,
52
+ x_end_batch,
53
+ x_rollback,
54
+ x_break,
55
+ x_wait_until,
56
56
  )
57
57
  from execsql.metacommands.data import (
58
- x_sub, # noqa: F401
59
- x_sub_add, # noqa: F401
60
- x_sub_append, # noqa: F401
61
- x_sub_empty, # noqa: F401
62
- x_rm_sub, # noqa: F401
63
- x_sub_local, # noqa: F401
64
- x_sub_tempfile, # noqa: F401
65
- x_sub_ini, # noqa: F401
66
- x_sub_querystring, # noqa: F401
67
- x_sub_encrypt, # noqa: F401
68
- x_sub_decrypt, # noqa: F401
69
- x_subdata, # noqa: F401
70
- x_selectsub, # noqa: F401
71
- x_prompt_selectsub, # noqa: F401
72
- x_empty_strings, # noqa: F401
73
- x_trim_strings, # noqa: F401
74
- x_replace_newlines, # noqa: F401
75
- x_empty_rows, # noqa: F401
76
- x_only_strings, # noqa: F401
77
- x_boolean_int, # noqa: F401
78
- x_boolean_words, # noqa: F401
79
- x_fold_col_hdrs, # noqa: F401
80
- x_trim_col_hdrs, # noqa: F401
81
- x_clean_col_hdrs, # noqa: F401
82
- x_del_empty_cols, # noqa: F401
83
- x_create_col_hdrs, # noqa: F401
84
- x_dedup_col_hdrs, # noqa: F401
85
- x_import_common_cols_only, # noqa: F401
86
- x_quote_all_text, # noqa: F401
87
- x_reset_counter, # noqa: F401
88
- x_reset_counters, # noqa: F401
89
- x_set_counter, # noqa: F401
90
- x_max_int, # noqa: F401
58
+ x_sub,
59
+ x_sub_add,
60
+ x_sub_append,
61
+ x_sub_empty,
62
+ x_rm_sub,
63
+ x_sub_local,
64
+ x_sub_tempfile,
65
+ x_sub_ini,
66
+ x_sub_querystring,
67
+ x_sub_encrypt,
68
+ x_sub_decrypt,
69
+ x_subdata,
70
+ x_selectsub,
71
+ x_prompt_selectsub,
72
+ x_empty_strings,
73
+ x_trim_strings,
74
+ x_replace_newlines,
75
+ x_empty_rows,
76
+ x_only_strings,
77
+ x_boolean_int,
78
+ x_boolean_words,
79
+ x_fold_col_hdrs,
80
+ x_trim_col_hdrs,
81
+ x_clean_col_hdrs,
82
+ x_del_empty_cols,
83
+ x_create_col_hdrs,
84
+ x_dedup_col_hdrs,
85
+ x_import_common_cols_only,
86
+ x_quote_all_text,
87
+ x_reset_counter,
88
+ x_reset_counters,
89
+ x_set_counter,
90
+ x_max_int,
91
91
  )
92
92
  from execsql.metacommands.debug import (
93
- x_debug_write_metacommands, # noqa: F401
94
- x_debug_commandliststack, # noqa: F401
95
- x_debug_iflevels, # noqa: F401
96
- x_debug_write_odbc_drivers, # noqa: F401
97
- x_debug_log_subvars, # noqa: F401
98
- x_debug_log_config, # noqa: F401
99
- x_debug_write_subvars, # noqa: F401
100
- x_debug_write_config, # noqa: F401
93
+ x_debug_write_metacommands,
94
+ x_debug_commandliststack,
95
+ x_debug_iflevels,
96
+ x_debug_write_odbc_drivers,
97
+ x_debug_log_subvars,
98
+ x_debug_log_config,
99
+ x_debug_write_subvars,
100
+ x_debug_write_config,
101
101
  )
102
102
  from execsql.metacommands.io import (
103
- x_export, # noqa: F401
104
- x_export_query, # noqa: F401
105
- x_export_query_with_template, # noqa: F401
106
- x_export_with_template, # noqa: F401
107
- x_export_ods_multiple, # noqa: F401
108
- x_export_metadata, # noqa: F401
109
- x_export_metadata_table, # noqa: F401
110
- x_import, # noqa: F401
111
- x_import_file, # noqa: F401
112
- x_import_ods, # noqa: F401
113
- x_import_ods_pattern, # noqa: F401
114
- x_import_xls, # noqa: F401
115
- x_import_xls_pattern, # noqa: F401
116
- x_import_parquet, # noqa: F401
117
- x_import_feather, # noqa: F401
118
- x_import_row_buffer, # noqa: F401
119
- x_show_progress, # noqa: F401
120
- x_export_row_buffer, # noqa: F401
121
- x_write, # noqa: F401
122
- x_write_create_table, # noqa: F401
123
- x_write_create_table_ods, # noqa: F401
124
- x_write_create_table_xls, # noqa: F401
125
- x_write_create_table_alias, # noqa: F401
126
- x_write_prefix, # noqa: F401
127
- x_write_suffix, # noqa: F401
128
- x_writescript, # noqa: F401
129
- x_include, # noqa: F401
130
- x_copy, # noqa: F401
131
- x_copy_query, # noqa: F401
132
- x_zip, # noqa: F401
133
- x_zip_buffer_mb, # noqa: F401
134
- x_rm_file, # noqa: F401
135
- x_make_export_dirs, # noqa: F401
136
- x_cd, # noqa: F401
137
- x_scan_lines, # noqa: F401
138
- x_hdf5_text_len, # noqa: F401
139
- x_serve, # noqa: F401
103
+ x_export,
104
+ x_export_query,
105
+ x_export_query_with_template,
106
+ x_export_with_template,
107
+ x_export_ods_multiple,
108
+ x_export_metadata,
109
+ x_export_metadata_table,
110
+ x_import,
111
+ x_import_file,
112
+ x_import_ods,
113
+ x_import_ods_pattern,
114
+ x_import_xls,
115
+ x_import_xls_pattern,
116
+ x_import_parquet,
117
+ x_import_feather,
118
+ x_import_row_buffer,
119
+ x_show_progress,
120
+ x_export_row_buffer,
121
+ x_write,
122
+ x_write_create_table,
123
+ x_write_create_table_ods,
124
+ x_write_create_table_xls,
125
+ x_write_create_table_alias,
126
+ x_write_prefix,
127
+ x_write_suffix,
128
+ x_writescript,
129
+ x_include,
130
+ x_copy,
131
+ x_copy_query,
132
+ x_zip,
133
+ x_zip_buffer_mb,
134
+ x_rm_file,
135
+ x_make_export_dirs,
136
+ x_cd,
137
+ x_scan_lines,
138
+ x_hdf5_text_len,
139
+ x_serve,
140
140
  )
141
141
  from execsql.metacommands.prompt import (
142
- x_prompt, # noqa: F401
143
- x_prompt_enter, # noqa: F401
144
- x_prompt_entryform, # noqa: F401
145
- x_prompt_pause, # noqa: F401
146
- x_prompt_compare, # noqa: F401
147
- x_prompt_ask_compare, # noqa: F401
148
- x_prompt_ask, # noqa: F401
149
- x_prompt_map, # noqa: F401
150
- x_prompt_action, # noqa: F401
151
- x_prompt_savefile, # noqa: F401
152
- x_prompt_openfile, # noqa: F401
153
- x_prompt_directory, # noqa: F401
154
- x_prompt_select_rows, # noqa: F401
155
- x_prompt_credentials, # noqa: F401
156
- x_prompt_connect, # noqa: F401
157
- x_ask, # noqa: F401
158
- x_pause, # noqa: F401
159
- x_msg, # noqa: F401
160
- x_reset_dialog_canceled, # noqa: F401
142
+ x_prompt,
143
+ x_prompt_enter,
144
+ x_prompt_entryform,
145
+ x_prompt_pause,
146
+ x_prompt_compare,
147
+ x_prompt_ask_compare,
148
+ x_prompt_ask,
149
+ x_prompt_map,
150
+ x_prompt_action,
151
+ x_prompt_savefile,
152
+ x_prompt_openfile,
153
+ x_prompt_directory,
154
+ x_prompt_select_rows,
155
+ x_prompt_credentials,
156
+ x_prompt_connect,
157
+ x_ask,
158
+ x_pause,
159
+ x_msg,
160
+ x_reset_dialog_canceled,
161
161
  )
162
162
  from execsql.metacommands.script_ext import (
163
- x_extendscript, # noqa: F401
164
- x_extendscript_metacommand, # noqa: F401
165
- x_extendscript_sql, # noqa: F401
166
- x_executescript, # noqa: F401
163
+ x_extendscript,
164
+ x_extendscript_metacommand,
165
+ x_extendscript_sql,
166
+ x_executescript,
167
167
  )
168
168
  from execsql.metacommands.system import (
169
- x_system_cmd, # noqa: F401
170
- x_email, # noqa: F401
171
- x_timer, # noqa: F401
172
- x_log, # noqa: F401
173
- x_logwritemessages, # noqa: F401
174
- x_log_datavars, # noqa: F401
175
- x_log_sql, # noqa: F401
176
- x_console, # noqa: F401
177
- x_consoleprogress, # noqa: F401
178
- x_consolewait, # noqa: F401
179
- x_consolewait_onerror, # noqa: F401
180
- x_consolewait_whendone, # noqa: F401
181
- x_console_hideshow, # noqa: F401
182
- x_consolewidth, # noqa: F401
183
- x_consoleheight, # noqa: F401
184
- x_consolestatus, # noqa: F401
185
- x_consolesave, # noqa: F401
186
- x_cancel_halt, # noqa: F401
187
- x_cancel_halt_write_clear, # noqa: F401
188
- x_cancel_halt_write, # noqa: F401
189
- x_cancel_halt_email_clear, # noqa: F401
190
- x_cancel_halt_email, # noqa: F401
191
- x_cancel_halt_exec, # noqa: F401
192
- x_cancel_halt_exec_clear, # noqa: F401
193
- x_error_halt_write_clear, # noqa: F401
194
- x_error_halt_write, # noqa: F401
195
- x_error_halt_email_clear, # noqa: F401
196
- x_error_halt_email, # noqa: F401
197
- x_error_halt_exec, # noqa: F401
198
- x_error_halt_exec_clear, # noqa: F401
199
- x_write_warnings, # noqa: F401
200
- x_gui_level, # noqa: F401
201
- x_execute, # noqa: F401
169
+ x_system_cmd,
170
+ x_email,
171
+ x_timer,
172
+ x_log,
173
+ x_logwritemessages,
174
+ x_log_datavars,
175
+ x_log_sql,
176
+ x_console,
177
+ x_consoleprogress,
178
+ x_consolewait,
179
+ x_consolewait_onerror,
180
+ x_consolewait_whendone,
181
+ x_console_hideshow,
182
+ x_consolewidth,
183
+ x_consoleheight,
184
+ x_consolestatus,
185
+ x_consolesave,
186
+ x_cancel_halt,
187
+ x_cancel_halt_write_clear,
188
+ x_cancel_halt_write,
189
+ x_cancel_halt_email_clear,
190
+ x_cancel_halt_email,
191
+ x_cancel_halt_exec,
192
+ x_cancel_halt_exec_clear,
193
+ x_error_halt_write_clear,
194
+ x_error_halt_write,
195
+ x_error_halt_email_clear,
196
+ x_error_halt_email,
197
+ x_error_halt_exec,
198
+ x_error_halt_exec_clear,
199
+ x_write_warnings,
200
+ x_gui_level,
201
+ x_execute,
202
202
  )
203
203
 
204
204
  # Regex helper functions (from utils/regex.py)
205
205
  from execsql.utils.regex import (
206
- ins_rxs, # noqa: F401
207
- ins_quoted_rx, # noqa: F401
208
- ins_schema_rxs, # noqa: F401
209
- ins_table_rxs, # noqa: F401
210
- ins_table_list_rxs, # noqa: F401
211
- ins_fn_rxs, # noqa: F401
206
+ ins_rxs,
207
+ ins_quoted_rx,
208
+ ins_schema_rxs,
209
+ ins_table_rxs,
210
+ ins_table_list_rxs,
211
+ ins_fn_rxs,
212
212
  )
213
- from execsql.script import MetaCommandList # noqa: F401
213
+ from execsql.script import MetaCommandList
214
+
215
+ __all__ = [
216
+ # execsql.state
217
+ "_state",
218
+ # connect handlers
219
+ "x_connect_pg",
220
+ "x_connect_user_pg",
221
+ "x_connect_ssvr",
222
+ "x_connect_user_ssvr",
223
+ "x_connect_mysql",
224
+ "x_connect_user_mysql",
225
+ "x_connect_access",
226
+ "x_connect_fb",
227
+ "x_connect_user_fb",
228
+ "x_connect_ora",
229
+ "x_connect_user_ora",
230
+ "x_connect_duckdb",
231
+ "x_connect_sqlite",
232
+ "x_connect_dsn",
233
+ "x_use",
234
+ "x_disconnect",
235
+ "x_autocommit_on",
236
+ "x_autocommit_off",
237
+ "x_pg_vacuum",
238
+ "x_daoflushdelay",
239
+ # control handlers
240
+ "x_if",
241
+ "x_if_orif",
242
+ "x_if_andif",
243
+ "x_if_elseif",
244
+ "x_if_else",
245
+ "x_if_block",
246
+ "x_if_end",
247
+ "x_loop",
248
+ "x_halt",
249
+ "x_halt_msg",
250
+ "x_error_halt",
251
+ "x_metacommand_error_halt",
252
+ "x_begin_batch",
253
+ "x_end_batch",
254
+ "x_rollback",
255
+ "x_break",
256
+ "x_wait_until",
257
+ # data handlers
258
+ "x_sub",
259
+ "x_sub_add",
260
+ "x_sub_append",
261
+ "x_sub_empty",
262
+ "x_rm_sub",
263
+ "x_sub_local",
264
+ "x_sub_tempfile",
265
+ "x_sub_ini",
266
+ "x_sub_querystring",
267
+ "x_sub_encrypt",
268
+ "x_sub_decrypt",
269
+ "x_subdata",
270
+ "x_selectsub",
271
+ "x_prompt_selectsub",
272
+ "x_empty_strings",
273
+ "x_trim_strings",
274
+ "x_replace_newlines",
275
+ "x_empty_rows",
276
+ "x_only_strings",
277
+ "x_boolean_int",
278
+ "x_boolean_words",
279
+ "x_fold_col_hdrs",
280
+ "x_trim_col_hdrs",
281
+ "x_clean_col_hdrs",
282
+ "x_del_empty_cols",
283
+ "x_create_col_hdrs",
284
+ "x_dedup_col_hdrs",
285
+ "x_import_common_cols_only",
286
+ "x_quote_all_text",
287
+ "x_reset_counter",
288
+ "x_reset_counters",
289
+ "x_set_counter",
290
+ "x_max_int",
291
+ # debug handlers
292
+ "x_debug_write_metacommands",
293
+ "x_debug_commandliststack",
294
+ "x_debug_iflevels",
295
+ "x_debug_write_odbc_drivers",
296
+ "x_debug_log_subvars",
297
+ "x_debug_log_config",
298
+ "x_debug_write_subvars",
299
+ "x_debug_write_config",
300
+ # io handlers
301
+ "x_export",
302
+ "x_export_query",
303
+ "x_export_query_with_template",
304
+ "x_export_with_template",
305
+ "x_export_ods_multiple",
306
+ "x_export_metadata",
307
+ "x_export_metadata_table",
308
+ "x_import",
309
+ "x_import_file",
310
+ "x_import_ods",
311
+ "x_import_ods_pattern",
312
+ "x_import_xls",
313
+ "x_import_xls_pattern",
314
+ "x_import_parquet",
315
+ "x_import_feather",
316
+ "x_import_row_buffer",
317
+ "x_show_progress",
318
+ "x_export_row_buffer",
319
+ "x_write",
320
+ "x_write_create_table",
321
+ "x_write_create_table_ods",
322
+ "x_write_create_table_xls",
323
+ "x_write_create_table_alias",
324
+ "x_write_prefix",
325
+ "x_write_suffix",
326
+ "x_writescript",
327
+ "x_include",
328
+ "x_copy",
329
+ "x_copy_query",
330
+ "x_zip",
331
+ "x_zip_buffer_mb",
332
+ "x_rm_file",
333
+ "x_make_export_dirs",
334
+ "x_cd",
335
+ "x_scan_lines",
336
+ "x_hdf5_text_len",
337
+ "x_serve",
338
+ # prompt handlers
339
+ "x_prompt",
340
+ "x_prompt_enter",
341
+ "x_prompt_entryform",
342
+ "x_prompt_pause",
343
+ "x_prompt_compare",
344
+ "x_prompt_ask_compare",
345
+ "x_prompt_ask",
346
+ "x_prompt_map",
347
+ "x_prompt_action",
348
+ "x_prompt_savefile",
349
+ "x_prompt_openfile",
350
+ "x_prompt_directory",
351
+ "x_prompt_select_rows",
352
+ "x_prompt_credentials",
353
+ "x_prompt_connect",
354
+ "x_ask",
355
+ "x_pause",
356
+ "x_msg",
357
+ "x_reset_dialog_canceled",
358
+ # script_ext handlers
359
+ "x_extendscript",
360
+ "x_extendscript_metacommand",
361
+ "x_extendscript_sql",
362
+ "x_executescript",
363
+ # system handlers
364
+ "x_system_cmd",
365
+ "x_email",
366
+ "x_timer",
367
+ "x_log",
368
+ "x_logwritemessages",
369
+ "x_log_datavars",
370
+ "x_log_sql",
371
+ "x_console",
372
+ "x_consoleprogress",
373
+ "x_consolewait",
374
+ "x_consolewait_onerror",
375
+ "x_consolewait_whendone",
376
+ "x_console_hideshow",
377
+ "x_consolewidth",
378
+ "x_consoleheight",
379
+ "x_consolestatus",
380
+ "x_consolesave",
381
+ "x_cancel_halt",
382
+ "x_cancel_halt_write_clear",
383
+ "x_cancel_halt_write",
384
+ "x_cancel_halt_email_clear",
385
+ "x_cancel_halt_email",
386
+ "x_cancel_halt_exec",
387
+ "x_cancel_halt_exec_clear",
388
+ "x_error_halt_write_clear",
389
+ "x_error_halt_write",
390
+ "x_error_halt_email_clear",
391
+ "x_error_halt_email",
392
+ "x_error_halt_exec",
393
+ "x_error_halt_exec_clear",
394
+ "x_write_warnings",
395
+ "x_gui_level",
396
+ "x_execute",
397
+ # regex helpers
398
+ "ins_rxs",
399
+ "ins_quoted_rx",
400
+ "ins_schema_rxs",
401
+ "ins_table_rxs",
402
+ "ins_table_list_rxs",
403
+ "ins_fn_rxs",
404
+ # MetaCommandList
405
+ "MetaCommandList",
406
+ # format constants
407
+ "DELIMITED_FORMATS",
408
+ "TEXT_FORMATS",
409
+ "JSON_VARIANT_FORMATS",
410
+ "QUERY_EXPORT_FORMATS",
411
+ "TABLE_EXPORT_FORMATS",
412
+ "SERVE_FORMATS",
413
+ "METADATA_FORMATS",
414
+ "ALL_EXPORT_FORMATS",
415
+ "DATABASE_TYPES",
416
+ # dispatch
417
+ "build_dispatch_table",
418
+ "DISPATCH_TABLE",
419
+ ]
214
420
 
215
421
  # ---------------------------------------------------------------------------
216
422
  # Export format constants — single source of truth.
@@ -251,6 +457,6 @@ DATABASE_TYPES = [
251
457
  # ---------------------------------------------------------------------------
252
458
  # Module-level DISPATCH_TABLE — built once at import time.
253
459
  # ---------------------------------------------------------------------------
254
- from execsql.metacommands.dispatch import build_dispatch_table # noqa: E402
460
+ from execsql.metacommands.dispatch import build_dispatch_table
255
461
 
256
462
  DISPATCH_TABLE = build_dispatch_table()
@@ -221,6 +221,8 @@ from execsql.metacommands import (
221
221
  TABLE_EXPORT_FORMATS,
222
222
  )
223
223
 
224
+ __all__ = ["build_dispatch_table"]
225
+
224
226
 
225
227
  def build_dispatch_table() -> MetaCommandList:
226
228
  """Construct and return the complete metacommand dispatch table."""
@@ -68,3 +68,44 @@ from execsql.metacommands.io_fileops import ( # noqa: F401
68
68
  x_zip,
69
69
  x_zip_buffer_mb,
70
70
  )
71
+
72
+ __all__ = [
73
+ "_apply_output_dir",
74
+ "x_cd",
75
+ "x_copy",
76
+ "x_copy_query",
77
+ "x_export",
78
+ "x_export_metadata",
79
+ "x_export_metadata_table",
80
+ "x_export_ods_multiple",
81
+ "x_export_query",
82
+ "x_export_query_with_template",
83
+ "x_export_row_buffer",
84
+ "x_export_with_template",
85
+ "x_hdf5_text_len",
86
+ "x_import",
87
+ "x_import_feather",
88
+ "x_import_file",
89
+ "x_import_ods",
90
+ "x_import_ods_pattern",
91
+ "x_import_parquet",
92
+ "x_import_row_buffer",
93
+ "x_import_xls",
94
+ "x_import_xls_pattern",
95
+ "x_include",
96
+ "x_make_export_dirs",
97
+ "x_rm_file",
98
+ "x_scan_lines",
99
+ "x_serve",
100
+ "x_show_progress",
101
+ "x_write",
102
+ "x_write_create_table",
103
+ "x_write_create_table_alias",
104
+ "x_write_create_table_ods",
105
+ "x_write_create_table_xls",
106
+ "x_write_prefix",
107
+ "x_write_suffix",
108
+ "x_writescript",
109
+ "x_zip",
110
+ "x_zip_buffer_mb",
111
+ ]