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

Tab-completion for functions #497

Closed
lnicola opened this issue Nov 16, 2024 · 5 comments
Closed

Tab-completion for functions #497

lnicola opened this issue Nov 16, 2024 · 5 comments

Comments

@lnicola
Copy link

lnicola commented Nov 16, 2024

I didn't find an open issue for this, and it's not clear if it's supposed to be working, but it's not.

@kenshaw
Copy link
Member

kenshaw commented Nov 16, 2024

We don't have a list of functions for all the databases. Due to the sheer volume of work involved in trying to put all of these together for all the databases (even just the core databases), it's not likely tab completion will work for every single SQL functionality, in the same way as psql. Happy to entertain a well written PR that adds support for more metadata retrieval/completion!

@nineinchnick
Copy link
Member

The issue description is not clear - are you saying it's not working at all, or for some drivers?

The autocompleter code can read functions from a driver: https://github.com/xo/usql/blob/master/drivers/completer/completer.go#L718
There are very few drivers that implement the FunctionReader interface though.

@lnicola
Copy link
Author

lnicola commented Nov 16, 2024

I tested on Postgres and SQLite, functions and table names don't get completed, keywords and \-commands do. Feel free to close if it's expected.

@nineinchnick
Copy link
Member

If this is a bug report, it might be a duplicate of #478

@lnicola
Copy link
Author

lnicola commented Nov 16, 2024

Yeah, I just tested with 0.18.1 (on Postgres), I get a lot of completions there, although they're not great (no column names, no functions in the select column list). But functions do show up after from.

Closing, partly because it overlaps with #478, partly because completions probably need more work.

@lnicola lnicola closed this as not planned Won't fix, can't repro, duplicate, stale Nov 16, 2024
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

3 participants