Vim Dadbod - My Favorite SQL Plugin

Поделиться
HTML-код
  • Опубликовано: 27 сен 2024
  • Continuing on with my neovim config rewrite, we've got a video about vim dadbod
    -- Dad Bod Plugins
    return {
    "tpope/vim-dadbod",
    "kristijanhusak/vim-dadbod-completion",
    "kristijanhusak/vim-dadbod-ui",
    }
    Configuration: github.com/tjd...
    Dadbod: github.com/tjd...
    Links
    Twitch: / teej_dv
    Twitter: / teej_dv
    Github: github.com/tjd...
    Neovim: BTW
    #neovim #programming #lua

Комментарии • 115

  • @mbsurfer
    @mbsurfer 4 месяца назад +55

    04:23
    "Which is one of, I think, the nicest farts
    - TJ, 2024

    • @teej_dv
      @teej_dv  4 месяца назад +9

      LOL

    • @daredude123
      @daredude123 3 месяца назад

      Sounds like a good tshirt print.

  • @mrmaniac9905
    @mrmaniac9905 4 месяца назад +15

    I love it. Reject modernity. SQL >>> &&& NVIM>>>>>

  • @rainerborene
    @rainerborene 4 месяца назад +12

    Just joined your membership. Keep rocking!

  • @thijsyo
    @thijsyo 4 месяца назад +4

    Thanks for circling this back to the bigger group, TJ! Feeling really good about our Q2 OKR's, especially once we start to leverage gen-AI. By the way, Chris on floor 6 has brought donuts today (you didn't hear this from me😉)

    • @JefCollier
      @JefCollier 4 месяца назад +1

      This made my day.

  • @componhead
    @componhead 4 месяца назад +4

    Oh, boy, your videos are awesome. I use dadbod from a long time, nonetheless the video is great (the bunch of minutes length works really well)! Thank you so much. Little feedback: sometimes could be useful see the file path at right.

  • @boreddad420
    @boreddad420 4 месяца назад +12

    dadbod might be the best plugin name of all time

  • @kristijanhusak
    @kristijanhusak 4 месяца назад +2

    Nice video TJ, I was wondering where are all those stars coming from :)
    I'll link this video in the readme on both plugins.

    • @teej_dv
      @teej_dv  4 месяца назад +1

      hahaha wonderful plugin and well deserved!!

  • @TlatoaniItzcoatl
    @TlatoaniItzcoatl 4 месяца назад +3

    man the results output for sqlite is so pretty. I bet MySQL and PosgreSQL look great too. Unfortunately MS SQL Server looks terrible. It's the only reason I don't really use it, that, plus the completion is not robust enough to handle cross database queries and or good enough for large sql scripts. But it's great for simple dml or ddl stuff.

  • @florentcigolotti8023
    @florentcigolotti8023 4 месяца назад +1

    Very nice video! I have been using it in my day to day job since a long time, so great experience so far. My preferred keymap is to run a query under the cursor with something like rq (for run query) set to "vipS". It selects the current paragraph en run the default DBUI_ExecuteQuery binded on S by vim-dadbod-ui.
    With that it is awesome! No more needs to comment SQL queries

  • @mohitkumar-jv2bx
    @mohitkumar-jv2bx 4 месяца назад +1

    Man 2 videos back to back!!!
    BTW, Expect a reply in your mail, in a week when i am done adding dadBod.

  • @艾曦-e4g
    @艾曦-e4g 4 месяца назад

    LOVE Tj! Feature I want is the comments string to work with comments.nvim plugin. So `gcc` or other shortcuts works fine in sql file too. Thanks Tj!

  • @PainfulBBQ
    @PainfulBBQ 4 месяца назад

    thank you so much, it looks really cool.
    One thing I’d hoped you would cover is configuring the connection between the plugin and something like Postgresql or Mysql

  • @jefferymuter4659
    @jefferymuter4659 Месяц назад

    As a recent convert from Goland to Nvim, this is incredible.

  • @steveaguay
    @steveaguay 4 месяца назад

    I gotta give it another try. That looked like a great experience. My sql viewer has been gui based forever and I find it hard to switch off dbeaver. It's so good.

  • @devopsphilosopher
    @devopsphilosopher 4 месяца назад

    I'm officially niche having absolutely enjoyed this video and understood everything you said. I feel like I'm amongst some of the coolest people on Earth.

  • @TylerTriesTech
    @TylerTriesTech 4 месяца назад +1

    Another great terminal based SQL tool to check out is Harlequin

    • @xthebumpx
      @xthebumpx 4 месяца назад +1

      Ooh. That looks neat, I need to give it a try.
      Edit: Tried it. It's really cool. Unfortunately, at work I need completions from multiple databases at the same time, which isn't supported.

  • @m47h4r
    @m47h4r 4 месяца назад

    What would we do if tj didn't post actually useful amazing videos! THANK YOU!

  • @TheMurinDeventa
    @TheMurinDeventa 4 месяца назад +3

    Mine a bit different, I have sqls lsp running when inside dadbod buffer so I have formatting and completion source and other lsp utilities

    • @teej_dv
      @teej_dv  4 месяца назад +1

      Nice, I might try that out next week

    • @KevinNitro
      @KevinNitro Месяц назад

      Excute me I'm a new guys learning sql. Is that you have to connect to the database in dadbod ui, then to connect the database to the current query (using sqls)?
      Can I see your configuration? Thank you.

  • @bugabinga
    @bugabinga 4 месяца назад +1

    I feel this irrational aversion to adding a non-lua plugin to the config. but this one is just too good to pass up xD

  • @traap.
    @traap. 4 месяца назад

    Nice video. Setting up WSL2 + MSSQL (sadly) + Arch Linux would be entertaining video.

  • @noomondai
    @noomondai 4 месяца назад

    Love these vids please keep them coming teej

    • @teej_dv
      @teej_dv  4 месяца назад

      will do :) another one went live today!

  • @gjermundification
    @gjermundification 4 месяца назад

    Fantastic plugin, I will have to learn how to add other data sources for this.

  • @jabawack81
    @jabawack81 4 месяца назад +1

    ok one more plugin to add to my neovim, thanks.

  • @maladroitthief
    @maladroitthief 4 месяца назад +1

    Mind doing a mongodb setup? I struggled with that last time I looked into DBUI

  • @chrisjames278
    @chrisjames278 4 месяца назад

    Great looking plugin. Thanks for the info!

    • @teej_dv
      @teej_dv  4 месяца назад

      No problem 😁

  • @ChrisCox-wv7oo
    @ChrisCox-wv7oo 4 месяца назад

    Didn't know this was possible. Super neat

  • @spicybaguette7706
    @spicybaguette7706 4 месяца назад +1

    Got that Oracle drip

  • @letanoname2966
    @letanoname2966 4 месяца назад

    It would be great if you could also cover formatting and connections, especially to 'picky' DBs, like the ones from Oracle
    Overall, great video! :D

  • @hectororopesa001
    @hectororopesa001 3 месяца назад

    corporate tj should do more videos!

  • @afroboi7454
    @afroboi7454 4 месяца назад

    man, I must really say,, neovim is soooooo fuckin awesome.

  • @TheTmLev
    @TheTmLev 4 месяца назад +1

    What about `dbee`?

  • @s-xatya5088
    @s-xatya5088 14 дней назад

    It doesn't work well with sqlserver. The query result doesn't format. Is there any way to fix it?

  • @DaibertDiego
    @DaibertDiego 4 месяца назад

    I would love if they release the Snowflake support for this plugin.

  • @sarojregmi200
    @sarojregmi200 4 месяца назад

    Great just was looking for a sql client in linux, found it in vim. Damn!! what a coincidence.

  • @patrickstival6179
    @patrickstival6179 4 месяца назад

    It would be nice if it was possible to do ctrl + enter to execute the query under cursor. Having to comment out other sql staments feels a bit awkward

  • @andrewiglinski148
    @andrewiglinski148 4 месяца назад

    I'm so curious as to whether or not you put on the corporate fit just for this video...

  • @metin4yt
    @metin4yt 26 дней назад

    Does it work with random .sql files? Will it provide completion in those, or only if inside the DBUI?

  • @akshettrj
    @akshettrj 4 месяца назад

    The man delivered

  • @markuslanggeng
    @markuslanggeng 4 месяца назад

    oh my.. this plugin is so cool!

  • @simonlauer9379
    @simonlauer9379 4 месяца назад

    uh I have been using that one for a while already. it’s great

  • @kingradical-x
    @kingradical-x 10 дней назад

    Can we get a video where you actually did your set up please? How do you alias the connections?

  • @tomasertola
    @tomasertola 4 месяца назад

    This is gold!

  • @Peter-el7fn
    @Peter-el7fn 4 месяца назад

    Thanks for all your great content!
    Have you tried how the completion works with CTES? E.g
    with my_songs as(
    select
    title as song_title ,
    length as duration
    where artist 'primegean'
    from theme_songs
    )
    select... (Do the completion pick up the name of the cte and the aliased col names..?

    • @teej_dv
      @teej_dv  4 месяца назад

      I haven't yet - that'd be a good test case (the buffer completion at least would work OK)

    • @Peter-el7fn
      @Peter-el7fn 4 месяца назад

      @@teej_dv I tried it and it seems like it is the buffer that handles it - i.e. columns in the cte does show up in the completion but it does not seem to be able to distinguish the scope (the cte) of the column.

  • @noxalbelnox
    @noxalbelnox 4 месяца назад

    great stuff

  • @lipepaniguel
    @lipepaniguel 4 месяца назад

    🤯

  • @bambitsunami4165
    @bambitsunami4165 4 месяца назад

    Really cool

  • @Cethris
    @Cethris 4 месяца назад

    Would be nice to see how to add a db to the list in the video. But good stuff anyway

  • @cattohappy9263
    @cattohappy9263 4 месяца назад +1

    What's happening? Two videos in a row?

  • @neeeeni
    @neeeeni 4 месяца назад

    I missing docker support

  • @HarshKumar-kv3xs
    @HarshKumar-kv3xs 4 месяца назад

    been using dbeaver for years, time to switch

    • @teej_dv
      @teej_dv  4 месяца назад

      haha heard a lot of people say that in the comments, had never heard of it before

  • @josecarloscirqueirajunior2914
    @josecarloscirqueirajunior2914 4 месяца назад

    nice plugin

  • @ryanvelbon
    @ryanvelbon 4 месяца назад +1

    lowercase SQL keywords? ... HARAM

  • @beest_
    @beest_ 4 месяца назад

    I like the plug-in very much, but I'm not a VIM/newVIM user. know the basics but never configured it. To add more complexity I'm on a windows system. Any Instructions? Help is very much apprecieated.

  • @SayfSentinel
    @SayfSentinel 4 месяца назад

    No more pgadmin for me since i discovered this plugin

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars 4 месяца назад

    .

  • @xthebumpx
    @xthebumpx 4 месяца назад +6

    SQL (specifically MS Sql Server) is one of my biggest pain points with Neovim. Dadbod/Dadbod-ui/Dadbod-ui-completion do what they do well, but the completion experience is still pretty limited compared even to vscode let alone something like Datagrip.

    • @hernancervera6621
      @hernancervera6621 4 месяца назад

      I use DBeaver with the Vrapper (Vim emulation) plugin and it has worked very nicely for me. There is some limited config that can be provided in VimScript. I have not used Datagrip but since that is from JetBrains I imagine the plugin IdeaVim is available there

    • @SauravPrashar-xh6mo
      @SauravPrashar-xh6mo 3 месяца назад

      were you able to use it with MS Sql? I didn't see that in the "supported dbs" list and assumed It wouldn't be of much use to me atm, but if it even allows me to not open up MSSQL stdio and do stuff in the editor itself, I think it would still work for me.

    • @CNich90
      @CNich90 Месяц назад

      This plugin is cool but dbeaver for database work is the cream of the crop

  • @jaswdrTheDev
    @jaswdrTheDev Месяц назад

    What is the command you used to run the query? Something that I hate on every single VIM/Neovim is that there is no QuickStart section just quickly showing how to use the plugin, instead I need to waste several minutes to read something that I even know is useful to me. Knowing how to execute the query is the most important action and is never mentioned in the Github README or documentation. WTF???!??!?!!?!?

  • @TankorSmash
    @TankorSmash 4 месяца назад

    `:set ft?` prints out the values too. I dunno about cmp, but `` already does buffer completions. Does Cmp do fuzzy search there too maybe?

  • @martinroa
    @martinroa 4 месяца назад

    I didn't know about Dadbod. I've been using vim sqlls for this purpose. Any idea of how these two compare?

  • @vaisakhkm783
    @vaisakhkm783 4 месяца назад

    This could have been an email....
    do you have a newsletter???

  • @BorisBrodski
    @BorisBrodski 4 месяца назад

    Can it follow foreign key constraints?
    I mean, jump from the id in the result column to the corresponding row in another table?

  • @kowalkem
    @kowalkem 4 месяца назад +1

    What about dbee? Seen it in your config before ;)

    • @teej_dv
      @teej_dv  4 месяца назад +2

      I tried it, but the completion experience wasn't as good (at least for now)

    • @kowalkem
      @kowalkem 4 месяца назад

      @@teej_dv sqls works for completion quite well 👌made a simple config to read a connection config file from the repo on LSP client start. Happy with it so far 😁

  • @simonlauer9379
    @simonlauer9379 4 месяца назад

    imagine the suffering of dbeaver plebs 😄

  • @user-ex9ip7zw9e
    @user-ex9ip7zw9e Месяц назад

    could anyone tell me how to use save_query?

  • @elalemanpaisa
    @elalemanpaisa Месяц назад

    where tf is your dutch accent

  • @simracing_evolve
    @simracing_evolve 4 месяца назад

    Im a little bit confused about this plugin. I already tried it about a month ago in this set of config and its ideal for write fast querries. But for serious company work i rather use dbeaver or access. Am i wrong here?

    • @teej_dv
      @teej_dv  4 месяца назад +1

      Can't really be wrong about something that's personal preference 😁 if you like it, I wouldn't switch!

  • @mikeyim9985
    @mikeyim9985 4 месяца назад +1

    Awesome plugin will use today!

    • @teej_dv
      @teej_dv  4 месяца назад

      LETS GOOOOO

  • @RazoBeckett.
    @RazoBeckett. 4 месяца назад

    you know what i am going to say "remember me ?"

    • @teej_dv
      @teej_dv  4 месяца назад

      yes razo, of course :)

  • @deanrumsby
    @deanrumsby 3 месяца назад

    Thanks for another great video TJ... Looking forward to giving this setup a whirl

  • @qwfp
    @qwfp 4 месяца назад

    Of course it's from TPope. Who else could make something so great? (Other than TJ, of course)

    • @teej_dv
      @teej_dv  4 месяца назад

      haha tpope inspired me to write plugins, so probably wouldn't have written any if he never did!

    • @qwfp
      @qwfp 4 месяца назад

      @@teej_dv we're all standing on the shoulders of giants

  • @roberfuentesg
    @roberfuentesg 4 месяца назад

    Hola Tj gracias por todos tu videos. Sabes he estado buscando algun plugin que pueda hacer lo que hace postman, he intentado con rest.nvim y console.nvim (creo que se llama asi no recuerdo bien) y nunca he podido hacerlos funcionar de la mejor manera. Tienes uno de tu preferencia? Saludos desde Chile.

  • @crow-dont-know
    @crow-dont-know 3 месяца назад

    After years of using GUIs like Postico and DBeaver, I have been using dadbod on a daily basis for about a year. It’s neat.

  • @bluehorizon9547
    @bluehorizon9547 3 месяца назад

    You were the chosen one! You were supposed to destroy emacs-all-in-one-paradigm not join it!

  • @VarunMehrishi
    @VarunMehrishi 4 месяца назад

    Cool, using this with DuckDB should make analysing large csv files a breeze!

  • @daltonyon
    @daltonyon 4 месяца назад

    I'll take a look in dadbod because I have been used DBeaver and is heavy, let's do it!!
    Thanks for the tip

  • @jackevansevo
    @jackevansevo 4 месяца назад

    I knew about Dadbod, but never knew about dadbod-ui. The UI is a gamechanger!

  • @driden1987
    @driden1987 4 месяца назад

    Is this a Take Tuesday? Is it back?
    Going to get dadbod, looks awesome

  • @Lars-ce4rd
    @Lars-ce4rd 4 месяца назад

    Thanks for those API keys, please don't revoke them. :)

    • @Lars-ce4rd
      @Lars-ce4rd 4 месяца назад

      gotcha

    • @teej_dv
      @teej_dv  4 месяца назад +1

      o o f

    • @Lars-ce4rd
      @Lars-ce4rd 4 месяца назад

      Ultimate smartass attention seeker (this guy)

  • @hamm8934
    @hamm8934 4 месяца назад

    Another great db tool i love is pgcli. Its a modern version of psql. Love it

  • @wesleychaffin4029
    @wesleychaffin4029 4 месяца назад

    I was wondering what this plugin was in an earlier video! Thanks for sharing

  • @albert21994
    @albert21994 4 месяца назад

    awesome!

  • @datoxx7977
    @datoxx7977 4 месяца назад

    Nice

  • @fredlthefred
    @fredlthefred 4 месяца назад

    this is fantastic - thx TJ for the tipp!!!

  • @mitchbet
    @mitchbet 4 месяца назад

    Downvoted, sql config should be all caps

    • @teej_dv
      @teej_dv  4 месяца назад +1

      you're correct, my apologies