-
Notifications
You must be signed in to change notification settings - Fork 66
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
Load database error #50
Comments
Hi @kristijanhusak any update for this issue? |
@glepnir I'll look into this. Did you try declaring different formats to see if it works? let g:dbs = [
\ { 'name': 'jianshu', 'url': 'mysql://root@localhost/jianshu' }
\ { 'name': 'ginweb', 'url': 'mysql://root@localhost/ginweb' },
\ ] |
@kristijanhusak I already tried it. the result is same. |
@glepnir as far as I know, in MySQL, all databases belong to the same schema. From your screenshot, I see both databases in both connections. |
@kristijanhusak you can see the |
I tried the dadbod |
@glepnir all mysql databases belong to SELECT schema_name FROM information_schema.schemata What would you expect to see in "Schemas" when you connect to specific database? |
To be honest, this statement is correct. It will return all databases in mysql。But just like the connected url. We want to connect to a certain database.Any current mysql connection url returns the entire mysql database.
|
@glepnir I don't think you have to. Doing |
Ok. But this is not important. What I want to say is that even if we connect to the specified database through the URL, the result is still the entire mysql database. |
@glepnir Yes, that's true. That's why I ask, what would you expect to be listed under 'Schemas' in drawer when you are connected to specific database? |
It looks like we need to query the views functions tables from schemes. I don't know the specific implementation. If we can't achieve it. I think we need to modify the readme and doc to remind other users. Any URL in mysql will return the entire mysql database. To avoid more trouble |
@glepnir pull latest and give it a test. |
Can you give me output of this: :echo db#adapter#mysql#tables('mysql://root@localhost/ginweb') I want to see what's that warning. |
@glepnir I edited my comment. I initially added the password for root. Do this: :echo db#adapter#mysql#tables('mysql://root@localhost/ginweb') |
|
@glepnir put whatever you put for url in dadbod-ui.
|
@glepnir pull latest changes and give it a test. |
@glepnir sorry, I don't get the warning, so I can't test it properly. Regex was wrong. Pull and test again. |
It still exist. vim-dadbod-ui/autoload/db_ui/drawer.vim Line 524 in 945f4ee
What about this? let a:db.tables.list = a:db.tables.list[2:len(a:db.tables.list)-1] |
I create a pr for this. please check thanks. |
@glepnir it will not work. I wrote on PR why. Try to go to line 524 in drawer.vim and tweak the filtering. |
@glepnir pull now and test. Closing square bracket wasn't escaped properly. |
closed. |
Hi @kristijanhusak
I use three different database connections, but after opening dadbod, I found that they are all connected to
mysql
.the
echo g:dbs
The text was updated successfully, but these errors were encountered: