Open
Description
Since #491, we lazy-load the catalog.
However, the major downside is that completions are only available for the catalog nodes that have been loaded already. Typically this would only include databases and schemas, not tables or columns (until their grandparent is expanded in the data table).
A couple of ideas for improving this:
- When triggering a member autocomplete, fetch the children. So if I type
schema.
, fetch schema's tables. This will take a bit of doing, as right now I believe the Completions don't have a formal reference back to their nodes (and in fact, a single deduplicated completion can refer to multiple nodes). So figuring out what to fetch when we get the stringschema
could be hard. - Cache the catalog (again), possibly only for the purposes of building completions. Given the above issues, I think it makes sense to cache the catalog tree, since that will be easier to invalidate when the nodes are loaded. (Though still not trivial).