glimpseio / Splice

Issues and support files for the Splice app by Glimpse I/O
https://glimpse.io
0 stars 0 forks source link

Outline Navigator does not get updated after 'ALTER TABLE' #16

Open vanHoesel opened 6 years ago

vanHoesel commented 6 years ago

The following works fine when running this query inside the query-editor:

BEGIN;
    /* my_new_column.sql */

    ALTER TABLE foo_table
        ADD COLUMN IF NOT EXISTS bar_column
            BOOLEAN;

COMMIT;

Dubble clicking on "Columns" in the "Outline Navigator" does show the newly created column in the Results Table. However, it does not appear underneath the "Columns" in the navigator.

Or maybe I should call the issue "Auto Refresh" ... without having an entire redraw of the navigator, but only an insert/removal of displayed lines.

marcprux commented 6 years ago

This would be a nice improvement. Currently, Splice doesn't parse any of the SQL (aside from minimal parsing for syntax highlighting), and so it doesn't know when a statement is altering the schema. We could invalidate the entire client-side cache whenever a statement is executed that looks like it updated the schema, but this would slow things down, especially for Oracle where schema metadata introspection in especially slow.

We'll think about good ways to implement this, though. Thanks for the suggestion.