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.
- execsql/cli/__init__.py +14 -0
- execsql/cli/dsn.py +2 -0
- execsql/cli/help.py +2 -0
- execsql/cli/run.py +4 -2
- execsql/constants.py +11 -0
- execsql/db/access.py +20 -0
- execsql/db/base.py +4 -0
- execsql/db/dsn.py +11 -8
- execsql/db/duckdb.py +12 -8
- execsql/db/firebird.py +17 -8
- execsql/db/mysql.py +13 -8
- execsql/db/oracle.py +22 -8
- execsql/db/postgres.py +21 -9
- execsql/db/sqlite.py +18 -8
- execsql/db/sqlserver.py +14 -8
- execsql/exporters/__init__.py +6 -1
- execsql/exporters/base.py +2 -0
- execsql/exporters/delimited.py +10 -0
- execsql/exporters/protocol.py +128 -0
- execsql/exporters/xls.py +8 -0
- execsql/format.py +3 -1
- execsql/gui/__init__.py +2 -0
- execsql/gui/base.py +2 -0
- execsql/gui/console.py +2 -0
- execsql/gui/desktop.py +1 -0
- execsql/gui/tui.py +134 -0
- execsql/importers/base.py +1 -0
- execsql/importers/csv.py +2 -0
- execsql/importers/feather.py +2 -0
- execsql/importers/ods.py +1 -0
- execsql/importers/xls.py +1 -0
- execsql/metacommands/__init__.py +386 -180
- execsql/metacommands/dispatch.py +2 -0
- execsql/metacommands/io.py +41 -0
- execsql/models.py +17 -0
- execsql/parser.py +41 -0
- execsql/script/control.py +2 -0
- execsql/script/engine.py +19 -0
- execsql/script/variables.py +9 -5
- execsql/state.py +312 -199
- execsql/types.py +46 -0
- {execsql2-2.4.5.dist-info → execsql2-2.6.0.dist-info}/METADATA +2 -2
- {execsql2-2.4.5.dist-info → execsql2-2.6.0.dist-info}/RECORD +62 -61
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/README.md +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/config_settings.sqlite +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/example_config_prompt.sql +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/execsql.conf +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/make_config_db.sql +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/md_compare.sql +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/md_glossary.sql +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/md_upsert.sql +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/pg_compare.sql +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/pg_glossary.sql +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/pg_upsert.sql +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/script_template.sql +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/ss_compare.sql +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/ss_glossary.sql +0 -0
- {execsql2-2.4.5.data → execsql2-2.6.0.data}/data/execsql2_extras/ss_upsert.sql +0 -0
- {execsql2-2.4.5.dist-info → execsql2-2.6.0.dist-info}/WHEEL +0 -0
- {execsql2-2.4.5.dist-info → execsql2-2.6.0.dist-info}/entry_points.txt +0 -0
- {execsql2-2.4.5.dist-info → execsql2-2.6.0.dist-info}/licenses/LICENSE.txt +0 -0
- {execsql2-2.4.5.dist-info → execsql2-2.6.0.dist-info}/licenses/NOTICE +0 -0
execsql/metacommands/__init__.py
CHANGED
|
@@ -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
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
164
|
-
x_extendscript_metacommand,
|
|
165
|
-
x_extendscript_sql,
|
|
166
|
-
x_executescript,
|
|
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,
|
|
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,
|
|
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,
|
|
207
|
-
ins_quoted_rx,
|
|
208
|
-
ins_schema_rxs,
|
|
209
|
-
ins_table_rxs,
|
|
210
|
-
ins_table_list_rxs,
|
|
211
|
-
ins_fn_rxs,
|
|
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
|
|
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
|
|
460
|
+
from execsql.metacommands.dispatch import build_dispatch_table
|
|
255
461
|
|
|
256
462
|
DISPATCH_TABLE = build_dispatch_table()
|
execsql/metacommands/dispatch.py
CHANGED
execsql/metacommands/io.py
CHANGED
|
@@ -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
|
+
]
|