• R/O
  • SSH

execsql: Commit

Default repository for execsql.py


Commit MetaInfo

Revision61718d63961144cb2c2b22f6ea3672e1421eba26 (tree)
Time2020-02-23 02:52:26
AuthorDreas Nielsen <dreas.nielsen@gmai...>
CommiterDreas Nielsen

Log Message

Renamed APPEND SCRIPT to EXTEND SCRIPT WITH SCRIPT.

Change Summary

Incremental Difference

diff -r 0a07bb94c9b6 -r 61718d639611 doc/source/metacommands.rst
--- a/doc/source/metacommands.rst Sat Feb 22 09:40:22 2020 -0800
+++ b/doc/source/metacommands.rst Sat Feb 22 09:52:26 2020 -0800
@@ -84,30 +84,6 @@
8484
8585
8686
87-.. index:: ! APPEND SCRIPT metacommand
88- single: Scripting
89-
90-.. _append_script:
91-
92-APPEND SCRIPT
93------------------------------------------
94-
95-::
96-
97- APPEND SCRIPT <script_1> TO <script_2>
98-
99-Merges two scripts, appending the lines of *script_1* to the end
100-of *script_2*. Both scripts must have already been defined using the
101-:ref:`BEGIN SCRIPT <beginscript>` metacommand. Parameters for *script_1*
102-are also added to *script_2*.
103-
104-If a cleanup script is named in an
105-:ref:`ON ERROR_HALT EXECUTE SCRIPT <error_halt_exec>` or
106-:ref:`ON CANCEL_HALT EXECUTE SCRIPT <cancel_halt_exec>` metacommand, the
107-APPEND SCRIPT metacommand allows the cleanup script to be extended as
108-appropriate.
109-
110-
11187 .. index:: ! ASK metacommand
11288 single: Substitution variables
11389 single: Exit status
@@ -1791,6 +1767,31 @@
17911767 in the EXPORT QUERY metacommand.
17921768
17931769
1770+.. index:: ! EXTEND SCRIPT metacommand
1771+ single: Scripting
1772+
1773+.. _extend_script:
1774+
1775+EXTEND SCRIPT
1776+-----------------------------------------
1777+
1778+::
1779+
1780+ EXTEND SCRIPT <script_1> WITH SCRIPT <script_2>
1781+
1782+Merges two scripts, appending the lines of *script_2* to the end
1783+of *script_1*. Both scripts must have already been defined using the
1784+:ref:`BEGIN SCRIPT <beginscript>` metacommand. Parameters for *script_2*
1785+are also added to *script_1*.
1786+
1787+If a cleanup script is named in an
1788+:ref:`ON ERROR_HALT EXECUTE SCRIPT <error_halt_exec>` or
1789+:ref:`ON CANCEL_HALT EXECUTE SCRIPT <cancel_halt_exec>` metacommand, the
1790+APPEND SCRIPT metacommand allows the cleanup script to be extended as
1791+appropriate.
1792+
1793+
1794+
17941795 .. index:: ! HALT metacommand
17951796 single: Exit status
17961797 single: GUI display
diff -r 0a07bb94c9b6 -r 61718d639611 execsql/execsql.py
--- a/execsql/execsql.py Sat Feb 22 09:40:22 2020 -0800
+++ b/execsql/execsql.py Sat Feb 22 09:52:26 2020 -0800
@@ -27,12 +27,12 @@
2727 #
2828 # ===============================================================================
2929
30-__version__ = "1.66.0"
30+__version__ = "1.66.1"
3131 __vdate = "2020-02-22"
3232
3333 primary_vno = 1
3434 secondary_vno = 66
35-tertiary_vno = 0
35+tertiary_vno = 1
3636
3737 import os
3838 import os.path
@@ -10009,8 +10009,9 @@
1000910009 x_copy_query))
1001010010
1001110011
10012+#**** EXTEND SCRIPT WITH SCRIPT
1001210013 #**** APPEND SCRIPT
10013-def x_appendscript(**kwargs):
10014+def x_extendscript(**kwargs):
1001410015 script1 = kwargs["script1"].lower()
1001510016 if script1 not in savedscripts:
1001610017 raise ErrInfo("cmd", other_msg="There is no SCRIPT named %s." % script1)
@@ -10025,7 +10026,10 @@
1002510026 if param not in s2.paramnames:
1002610027 s2.paramnames.append(param)
1002710028
10028-metacommands.append(MetaCommand(r'\s*APPEND\s+SCRIPT\s+(?P<script1>\w+)\s+TO\s+(?P<script2>\w+)\s*$', x_appendscript))
10029+metacommands.append(MetaCommand(r'\s*EXTEND\s+SCRIPT\s+(?P<script2>\w+)\s+WITH\s+SCRIPT\s+(?P<script1>\w+)\s*$', x_extendscript))
10030+metacommands.append(MetaCommand(r'\s*APPEND\s+SCRIPT\s+(?P<script1>\w+)\s+TO\s+(?P<script2>\w+)\s*$', x_extendscript))
10031+
10032+
1002910033
1003010034 #**** EXECUTE SCRIPT
1003110035 def x_executescript(**kwargs):
Show on old repository browser