Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated #51

Open
SingularisArt opened this issue Aug 3, 2023 · 8 comments
Open

Deprecated #51

SingularisArt opened this issue Aug 3, 2023 · 8 comments

Comments

@SingularisArt
Copy link

I don't know why I keep getting this error:

Error executing Lua callback: .../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:45: function db_ui#find_buffer[25]..59[19]..FileType Autocomm ands for "mysql"..function vim_dadbod_completion#fetch[16]..<SNR>80_get_buffer_db_info[8]..db#connect, line 29: DB exec error: /usr/bin/mysql: Deprecat ed program name. It will be removed in a future release, use '/usr/bin/mariadb' instead stack traceback: [C]: in function 'cmd'
  .../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:45: in function <.../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:16>

I'm using mariadb instead of MySQL. Here's my configuration:

...
  {
    "tpope/vim-dadbod",
    config = function()
      local function db_completion()
        require("cmp").setup.buffer { sources = { { name = "vim-dadbod-completion" } } }
      end

      vim.g.db_ui_save_location = vim.fn.stdpath "config" .. require("plenary.path").path.sep .. "db_ui"

      vim.api.nvim_create_autocmd("FileType", {
        pattern = {
          "sql",
        },
        command = [[setlocal omnifunc=vim_dadbod_completion#omni]],
      })

      vim.api.nvim_create_autocmd("FileType", {
        pattern = {
          "sql",
          "mysql",
          "plsql",
        },
        callback = function()
          vim.schedule(db_completion)
        end,
      })
    end,
    cmd = { "DBUIToggle", "DBUI", "DBUIAddConnection", "DBUIFindBuffer", "DBUIRenameBuffer", "DBUILastQueryInfo" },
    dependencies = {
      "kristijanhusak/vim-dadbod-ui",
      "kristijanhusak/vim-dadbod-completion",
    },
  },
  {
    "nanotee/sqls.nvim",
    cmd = {
      "SqlsExecuteQuery",
      "SqlsExecuteQueryVertical",
      "SqlsShowDatabases",
      "SqlsShowSchemas",
      "SqlsShowConnections",
      "SqlsSwitchDatabase",
      "SqlsSwitchConnection",
    },
  },
...
@kristijanhusak
Copy link
Owner

Does your dadbod work fine? For example, try doing :DB select * from users when you are in the buffer.

@SingularisArt
Copy link
Author

SingularisArt commented Aug 4, 2023

When I run that, I get the error: DB: no URL. Can you provide me with a link to a tutorial or something that goes over on how to set up neovim for SQL development? I used to use the SQLS language server, but after it was archived, all my development setup crashed.

Also, I have to use this fork because I keep getting the error saying that /usr/bin/mysql is deprecated. Use /urs/bin/mariadb instead.

@kristijanhusak
Copy link
Owner

Follow instructions on https://github.com/kristijanhusak/vim-dadbod-ui how to set up a connection, and when you start a new query from there it should set up everything for you.

@SingularisArt
Copy link
Author

I got it working with this fork. But, in the DBUI view, it's not listing the columns.
display

Copy link

stale bot commented Dec 15, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stalled label Dec 15, 2023
@kristijanhusak
Copy link
Owner

This should probably work out once tpope/vim-dadbod#138 is merged

@stale stale bot removed the stalled label Dec 15, 2023
Copy link

stale bot commented Mar 13, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stalled label Mar 13, 2024
@kristijanhusak
Copy link
Owner

Is this issue now solved?

@stale stale bot removed the stalled label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants