MattiasMTS / cmp-dbee

Autocompletion for nvim-dbee
MIT License
49 stars 9 forks source link

SQLSERVER: Completion engine is adding `dbo` in front of table name #20

Closed JustBarnt closed 4 months ago

JustBarnt commented 4 months ago

I use Dbee with SQLServer and all works well. I wanted some completion though, so I installed this. But I noticed that within your demo video (which is using duckdb it seems) you just get table names. But within SQLServer it seems to include dbo in front of it. Is there a way to circumvent this?

MattiasMTS commented 4 months ago

Hi @JustBarnt thanks for opening this issue!

The video is a bit outdated. I plan to work give this plugin a bit more love during this weekend when I've more time.

Presumably what you're encountering is my opinionated way of giving tables, which was introduced in #15. So, what you're seeing is that you get the schema in front of your tables, which IMO is the best thing because it reduce ambiguousness - especially when it comes to column completion via aliasing.

Could you check that dbo is indeed the schema in this case? 😋

JustBarnt commented 4 months ago

Yes in my case dbo is indeed the schema, at my work we only use the dbo schema for sqlserver which is the default as my current understanding.

So that does make sense from the perspective of working with database where there may be multiple schemas, so I agree on that note then that it makes sense.

Do you think you would be open to a feature request where including the schema could be omitted? If not I understand and now that you explain it, it makes perfect sense.

Thanks for responding to this so quickly!

MattiasMTS commented 4 months ago

Of course I'll make it customisable! Again, thanks for opening the issue 😄 I'll try to make v2 super good shortly.

Please, keep them ideas coming so we make this plugin awesome!

JustBarnt commented 4 months ago

Awesome thank you so much! Looking foward to it! This is fantastic along side nvim-dbee