Comments (8)
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.
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.
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.
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.
Agree, it would be super nice!
from nvim-dbee.
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.
@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.
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)
- [Feature] Set filetypes HOT 1
- [bug] Use empty lines in drawer HOT 9
- [feat] Allow to configure window options for the hovers, such as borders HOT 8
- Hide some schemas from drawer view HOT 2
- Add icon or highlight indication of inactive connection HOT 3
- [Windows]: Dbee is not able to read local/globaly saved notes
- [Windows]: Create a note creates a set of directories instead of just a single `.sql` file throws error on `mkdir` HOT 5
- Use ParseURL in Redis adapter to properly parse complex URLs HOT 1
- Can't query database at all HOT 1
- `QuitPre` callback breaks `:qa!`
- [QUESTION] How to query MySQL table instead of the whole server?
- [Performance] Disable automatic database drawer refresh HOT 1
- Registering resource fails when running the Dbee command from go installation HOT 1
- The output window should not combine the results of multiple queries
- Doesn't work with packer and LunarVim HOT 2
- Clickhouse Nullable columns in result window HOT 2
- timeout for executing queries HOT 1
- PostgreSQL commands not working HOT 3
- DrawerUI is broken on windows HOT 5
- [potential contribution] listing more than just tables in the drawer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-dbee.