feat: Support for CREATE VIEW statements#199
feat: Support for CREATE VIEW statements#199apstndb wants to merge 2 commits intocloudspannerecosystem:mainfrom
Conversation
32366e4 to
3ea7384
Compare
|
Thank you for this - I will look into it in the next couple of days... As for ordering, views depend on tables and indexes, so drop the views before dropping indexes, and create the view after creating the tables and indexes. A modified view would have to be implemented as a drop / recreate, as a modified view may be due to table cols being dropped and table cols being created.... |
|
Thank you for quick replying. |
|
Ah, good point. I deal with this in tables by keeping the creation order of the tables from the original DDL and ensure that tables are created in the same order (and deleted in the reverse order). IIRC I use a linkedhashmap for storing the table objects so they the insertion order of the keys (table names) is preserved, so this can be used to ensure that creation / deletion order of the views are preserved. |
Original(
|
This PR implements
CREATE [OR REPLACE] VIEWsuppoort.TODO:
VIEWs have dependencies.Related Issue