Doesn't work and I don't understand why
I installed the plugin via Lazy, not using any pre-packaged nvim, just my own config.
this is my sqlua.lua file:
return {
{
"xemptuous/sqlua.nvim",
lazy = true,
cmd = "SQLua",
config = function()
require("sqlua").setup()
end,
},
}
I added my connection string to connections.json like:
[{"url": "mysql://[user]:[password]@localhost:3306/[db]", "name": "mydb"}]
I get this error when selecting the database I want to work with in the tree
When trying to execute queries, I get:
E5108: Error executing lua: ...user/.local/share/nvim/lazy/sqlua.nvim/lua/sqlua/ui.lua:1359: attempt to index local 'db' (a nil value)
stack traceback:
...user/.local/share/nvim/lazy/sqlua.nvim/lua/sqlua/ui.lua:1359: in function <...user/.local/share/nvim/lazy/sqlua.nvim/lua/sqlua/ui.lua:1342>
Am I missing something or could this be an issue when running a DB in docker?
I think the issue has to do with the MySQL base connector. I haven't implemented it properly it seems, as arch suggests and supports MariaDB as a replacement in general, so I may not have explicitly tested it. I can look into solving this.
In the meanwhile, try using mariadb in your connections.json instead of mysql and see if that works. I imagine they should be compatible ftmp
I have this same issue for Snowflake; identical error code.
I have this same error for mysql. Using mariadb instead does not raise the error but still does not work.