Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completion in historical queries #19

Open
detule opened this issue Feb 15, 2021 · 0 comments
Open

Completion in historical queries #19

detule opened this issue Feb 15, 2021 · 0 comments

Comments

@detule
Copy link
Collaborator

detule commented Feb 15, 2021

Currently completion works well (or so I think!) in queries that are being typed out.

However there is one issue I have encountered - say:

  • You connect to a database: DbMetadata object gets a list of catalogs as the connection is immediately expanded.
  • You recall a query from history SELECT * FROM AdventureWorks2017.Person.Address
  • Auto complete works fine if you were to, for example expand the query with ... WHERE.
  • However if you were to erase from the end and try and reach a different table within the AdventureWorks2017.Person schema completion would come up blank since at that point it hasn't enumerated the schema within the AdventureWorks2017 catalog. (DbMetadata returns None, which is a signal to the completer that this is not a valid catalog.schema combination)

One possible solution - prior to returning None, perhaps DbMetadata should check if AdventureWorks2017 has been listed at all.

Long term solution is that all the extend_* calls should be taken out of the completer and brought inside DbMetadata so that we can house all the logic of the form if not found then query in one place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant