Git Product home page Git Product logo

Comments (8)

kndndrj avatar kndndrj commented on July 20, 2024 2

Update: @MattiasMTS started working on completion extension: https://github.com/MattiasMTS/cmp-dbee

Once complete, let's add something to the docs to point people to the extension.

from nvim-dbee.

MattiasMTS avatar MattiasMTS commented on July 20, 2024 2

The cmp-dbee has now been tested a bit, when I finally had some free time from work. Sorry for the delay 😬. Feel free to try it out and open any issue you find'! Hopefully we can make it an awesome plug-in woo 😄

from nvim-dbee.

MattiasMTS avatar MattiasMTS commented on July 20, 2024 1

Thanks for the feedback @D00mch !! Super glad you worked with it for a while 🌟
I've some stuff that I need to add, e.g. availability, lazy loading, testing, docs, heh.. So, I'm extremely grateful for early-testers 🤝

The default out of the box suggestion is indeed schemas (or aliases/cte if they exist). We can for sure extend this to also include models (=tables/views/functions) directly out of the box as well. However, the main reason why I didn't add this in the first place is because I like explicitly over implicitly (heh..). For example, the column completion is done by triggering the Columns method, and for postgres adapter it needs the schema (see (https://github.com/kndndrj/nvim-dbee/blob/master/dbee/adapters/postgres_driver.go#L39-L47)).

However, if we find the table -> we can also find the schema (thanks to the nice interface done by @kndndrj 😉 ). So, if this is a feature you would like to have, i.e. having models suggested out of the box as well, I can try to carve out some time for it.

Feel free to +1 this comment or open an issue on the repo for this 😄
Again, thanks for the testing! ✋ 5️⃣

from nvim-dbee.

kndndrj avatar kndndrj commented on July 20, 2024 1

Hey, since @MattiasMTS created the extension, I think this issue can be closed.

I mentioned the extension in the README.

Further discussion can be had in extension's repo.

from nvim-dbee.

kndndrj avatar kndndrj commented on July 20, 2024

Agree, it would be super nice!

from nvim-dbee.

kndndrj avatar kndndrj commented on July 20, 2024

Minor update: I probably won't find the time to implement something like this anytime soon - and I have enough work with core already.

>>BUT<< in the refactor/first branch, which should be merged soon, there is an api exposed and it should enable an "external" plugin author to implement something like this.

from nvim-dbee.

D00mch avatar D00mch commented on July 20, 2024

@MattiasMTS , I worked with it for several minutes, looks fine.

The only thing I noticed is that I have to use schema.

For example, Intellij Idea DB plugin (as well as psql) gives completion:

select * from de | <it suggests 'device'>

You cmp-dbee plugin suggests public. If you write

select * from de | <it suggests nothing>

But if you write:

select * from  | <it suggests 'public'>
select * from public.de  | <it suggests 'device'>

I used Postgres,
OSX: 13.6.2 (22G320)
NVIM v0.9.5

from nvim-dbee.

MattiasMTS avatar MattiasMTS commented on July 20, 2024

I've now added a suggestion on table/views/functions out of the box with a little twist that I think is awesome.
Here is the PR MattiasMTS/cmp-dbee#15. Feel free to try it out!


EDIT at @D00mch

from nvim-dbee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.