Default repository for execsql.py
Revision | 61718d63961144cb2c2b22f6ea3672e1421eba26 (tree) |
---|---|
Time | 2020-02-23 02:52:26 |
Author | Dreas Nielsen <dreas.nielsen@gmai...> |
Commiter | Dreas Nielsen |
Renamed APPEND SCRIPT to EXTEND SCRIPT WITH SCRIPT.
@@ -84,30 +84,6 @@ | ||
84 | 84 | |
85 | 85 | |
86 | 86 | |
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 | - | |
111 | 87 | .. index:: ! ASK metacommand |
112 | 88 | single: Substitution variables |
113 | 89 | single: Exit status |
@@ -1791,6 +1767,31 @@ | ||
1791 | 1767 | in the EXPORT QUERY metacommand. |
1792 | 1768 | |
1793 | 1769 | |
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 | + | |
1794 | 1795 | .. index:: ! HALT metacommand |
1795 | 1796 | single: Exit status |
1796 | 1797 | single: GUI display |
@@ -27,12 +27,12 @@ | ||
27 | 27 | # |
28 | 28 | # =============================================================================== |
29 | 29 | |
30 | -__version__ = "1.66.0" | |
30 | +__version__ = "1.66.1" | |
31 | 31 | __vdate = "2020-02-22" |
32 | 32 | |
33 | 33 | primary_vno = 1 |
34 | 34 | secondary_vno = 66 |
35 | -tertiary_vno = 0 | |
35 | +tertiary_vno = 1 | |
36 | 36 | |
37 | 37 | import os |
38 | 38 | import os.path |
@@ -10009,8 +10009,9 @@ | ||
10009 | 10009 | x_copy_query)) |
10010 | 10010 | |
10011 | 10011 | |
10012 | +#**** EXTEND SCRIPT WITH SCRIPT | |
10012 | 10013 | #**** APPEND SCRIPT |
10013 | -def x_appendscript(**kwargs): | |
10014 | +def x_extendscript(**kwargs): | |
10014 | 10015 | script1 = kwargs["script1"].lower() |
10015 | 10016 | if script1 not in savedscripts: |
10016 | 10017 | raise ErrInfo("cmd", other_msg="There is no SCRIPT named %s." % script1) |
@@ -10025,7 +10026,10 @@ | ||
10025 | 10026 | if param not in s2.paramnames: |
10026 | 10027 | s2.paramnames.append(param) |
10027 | 10028 | |
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 | + | |
10029 | 10033 | |
10030 | 10034 | #**** EXECUTE SCRIPT |
10031 | 10035 | def x_executescript(**kwargs): |