mirror of
https://github.com/jackfoxy/urQL.git
synced 2024-08-16 23:30:51 +03:00
refactor alter table as of
This commit is contained in:
parent
4afc466983
commit
95a14bd6b1
@ -225,95 +225,55 @@
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ ~ ~ +>.parsed ~) commands]
|
||||
==
|
||||
?: ?&(=(+<-.parsed %alter-column) ?=([* [* %as-of *]] parsed))
|
||||
?: =(%now +>+.parsed)
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed +<+.parsed ~ ~ ~ ~ ~) commands]
|
||||
==
|
||||
?: ?=([@ @] +>+.parsed)
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed +<+.parsed ~ ~ ~ ~ [~ +>+>.parsed]) commands]
|
||||
==
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
?: =(%now +>+.parsed)
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed +<+.parsed ~ ~ ~ ~ ~) commands]
|
||||
?: ?=([@ @] +>+.parsed)
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed +<+.parsed ~ ~ ~ ~ [~ +>+>.parsed]) commands]
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed +<+.parsed ~ ~ ~ ~ [~ (as-of-offset:ast %as-of-offset +>+<.parsed +>+>-.parsed)]) commands]
|
||||
==
|
||||
?: ?&(=(+<-.parsed %add-column) ?=([* [* %as-of *]] parsed))
|
||||
?: =(%now +>+.parsed)
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ +<+.parsed ~ ~ ~ ~) commands]
|
||||
==
|
||||
?: ?=([@ @] +>+.parsed)
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ +<+.parsed ~ ~ ~ [~ +>+>.parsed]) commands]
|
||||
==
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
?: =(%now +>+.parsed)
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ +<+.parsed ~ ~ ~ ~) commands]
|
||||
?: ?=([@ @] +>+.parsed)
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ +<+.parsed ~ ~ ~ [~ +>+>.parsed]) commands]
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ +<+.parsed ~ ~ ~ [~ (as-of-offset:ast %as-of-offset +>+<.parsed +>+>-.parsed)]) commands]
|
||||
==
|
||||
?: ?&(=(+<-.parsed %drop-column) ?=([* [* %as-of *]] parsed))
|
||||
?: =(%now +>+.parsed)
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ +<+.parsed ~ ~ ~) commands]
|
||||
==
|
||||
?: ?=([@ @] +>+.parsed)
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ +<+.parsed ~ ~ [~ +>+>.parsed]) commands]
|
||||
==
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
?: =(%now +>+.parsed)
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ +<+.parsed ~ ~ ~) commands]
|
||||
?: ?=([@ @] +>+.parsed)
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ +<+.parsed ~ ~ [~ +>+>.parsed]) commands]
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ +<+.parsed ~ ~ [~ (as-of-offset:ast %as-of-offset +>+<.parsed +>+>-.parsed)]) commands]
|
||||
==
|
||||
?: ?&(=(+<-.parsed %add-fk) ?=([* [* %as-of *]] parsed))
|
||||
?: =(%now +>+.parsed)
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ ~ (build-foreign-keys [-.parsed +<+.parsed]) ~ ~) commands]
|
||||
==
|
||||
?: ?=([@ @] +>+.parsed)
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ ~ (build-foreign-keys [-.parsed +<+.parsed]) ~ [~ +>+>.parsed]) commands]
|
||||
==
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
?: =(%now +>+.parsed)
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ ~ (build-foreign-keys [-.parsed +<+.parsed]) ~ ~) commands]
|
||||
?: ?=([@ @] +>+.parsed)
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ ~ (build-foreign-keys [-.parsed +<+.parsed]) ~ [~ +>+>.parsed]) commands]
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ ~ (build-foreign-keys [-.parsed +<+.parsed]) ~ [~ (as-of-offset:ast %as-of-offset +>+<.parsed +>+>-.parsed)]) commands]
|
||||
==
|
||||
?: ?&(=(+<-.parsed %drop-fk) ?=([* [* %as-of *]] parsed))
|
||||
?: =(%now +>+.parsed)
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ ~ ~ +<+.parsed ~) commands]
|
||||
==
|
||||
?: ?=([@ @] +>+.parsed)
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ ~ ~ +<+.parsed [~ +>+>.parsed]) commands]
|
||||
==
|
||||
%= $
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ ~ ~ +<+.parsed [~ (as-of-offset:ast %as-of-offset +>+<.parsed +>+>-.parsed)]) commands]
|
||||
==
|
||||
script q.q.u.+3.q:table-nail
|
||||
commands
|
||||
?: =(%now +>+.parsed)
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ ~ ~ +<+.parsed ~) commands]
|
||||
?: ?=([@ @] +>+.parsed)
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ ~ ~ +<+.parsed [~ +>+>.parsed]) commands]
|
||||
[`command:ast`(alter-table:ast %alter-table -.parsed ~ ~ ~ ~ +<+.parsed [~ (as-of-offset:ast %as-of-offset +>+<.parsed +>+>-.parsed)]) commands]
|
||||
==
|
||||
~|("Cannot parse table {<p.q.command-nail>}" !!)
|
||||
%create-database
|
||||
~| 'Create database must be only statement in script'
|
||||
|
Loading…
Reference in New Issue
Block a user