sqls
sqls copied to clipboard
completion support for non default schema
As seen in https://github.com/sqls-server/sqls/issues/99 and https://github.com/sqls-server/sqls/issues/121 there is lack of support for completion when working with other schemas/databases other than the default schema/database. So this in the initial effort to fix this issue bringing support for:
- table completion when given the schema
- table description for table in any schema
- column completion when given table in any schema
- column completion for tables in any schema referenced in the join clause
Test were added so that the new features/changes are covered
Looks good.
Any updates on this? I'd like to use it awesome feature.
Hello. Tried to build from [aokiji:feature/add-non-default-schema-support] branch, and completion for non-default schemas still not works (ಥ_ಥ)
Hello. Tried to build from [aokiji:feature/add-non-default-schema-support] branch, and completion for non-default schemas still not works (ಥ_ಥ)
Built it recently and tested on a postgres database successfully, if you have a large database as was my case, you may need to include also changes from https://github.com/sqls-server/sqls/pull/147
Yeah, i was too fast with my conclusions, autocomplete works, but its behavior seem a little bit strange. For example when i type schema name - nothing happens, however if i try to type name of a table then completion let me choose from tables with similar names in all schemas in a database. Also completion don't works when i want to choose columns for output in select statement
https://github.com/user-attachments/assets/8364c4cf-161b-4fc3-a414-b37a9bcf6928
Ready to merge?
This has issues. Can't use schema names in joins:
Screencast From 2025-05-20 17-21-24.webm
As you can see I don't get completions after using stores (which is the schema name). But I get them without the schema name.
Using table alias names doesn't help either.