Comments (29)
Hi @kristijanhusak any update for this issue?
from vim-dadbod-ui.
@glepnir I'll look into this. Did you try declaring different formats to see if it works?
For example, try something like this to see if you get the same results:
let g:dbs = [
\ { 'name': 'jianshu', 'url': 'mysql://root@localhost/jianshu' }
\ { 'name': 'ginweb', 'url': 'mysql://root@localhost/ginweb' },
\ ]
from vim-dadbod-ui.
@kristijanhusak I already tried it. the result is same.
from vim-dadbod-ui.
@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.
How would you expect it to work?
from vim-dadbod-ui.
@kristijanhusak you can see the crawler
and ginweb
both connect to mysql db
. not ginweb
database
from vim-dadbod-ui.
I tried the dadbod DB mysql://root@localhost/ginweb
. it's only connect to ginweb database.
from vim-dadbod-ui.
@glepnir all mysql databases belong to mysql db
, that's why you see them in both connections.
Schemas are fetched from this query:
SELECT schema_name FROM information_schema.schemata
What would you expect to see in "Schemas" when you connect to specific database?
from vim-dadbod-ui.
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.
This is strange. Why do we need to specify a certain database in the URL? Even if it is specified, it loses meaning. Because we still see all the databases in mysql.
ginweb: mysql://root@localhost/ginweb same as mysql:mysql@localhost/mysql
crawler: mysql://root@localhost/crawler same as mysql:mysql@localhost/mysql
from vim-dadbod-ui.
@glepnir I don't think you have to. Doing mysql://root@localhost
should be enough.
from vim-dadbod-ui.
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.
from vim-dadbod-ui.
@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?
from vim-dadbod-ui.
Obviously I only want to see information about this database. Maybe like this? ginweb: mysql://root@localhost/ginweb
from vim-dadbod-ui.
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
from vim-dadbod-ui.
@glepnir pull latest and give it a test.
It should print out whole mysql db only if url doesn't have specified db (mysql://root@localhost
).
If db is specified, it should show only tables.
from vim-dadbod-ui.
It looks good, but can there be 2 tables hidden?
from vim-dadbod-ui.
Can you give me output of this:
:echo db#adapter#mysql#tables('mysql://root@localhost/ginweb')
I want to see what's that warning.
from vim-dadbod-ui.
from vim-dadbod-ui.
@glepnir I edited my comment. I initially added the password for root. Do this:
:echo db#adapter#mysql#tables('mysql://root@localhost/ginweb')
from vim-dadbod-ui.
Can you give me output of this:
:echo db#adapter#mysql#tables('mysql://root@localhost/ginweb')I want to see what's that warning.
:echo db#adapter#mysql#tables('mysql://root@localhost/ginweb')
this command same as pre command? The output is same as pic ? Do i need update the dadbod-ui?
from vim-dadbod-ui.
@glepnir put whatever you put for url in dadbod-ui.
From screenshot it looks like you provided a password for root, but you are not using any password.
If you are using password for root, do it like this:
:echo db#adapter#mysql#tables('mysql://root:YOURPASSWORD@localhost/ginweb')
from vim-dadbod-ui.
from vim-dadbod-ui.
@glepnir pull latest changes and give it a test.
from vim-dadbod-ui.
Does not hidden this in latest version?
from vim-dadbod-ui.
@glepnir sorry, I don't get the warning, so I can't test it properly. Regex was wrong. Pull and test again.
from vim-dadbod-ui.
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]
from vim-dadbod-ui.
I create a pr for this. please check thanks.
from vim-dadbod-ui.
@glepnir it will not work. I wrote on PR why. Try to go to line 524 in drawer.vim and tweak the filtering.
from vim-dadbod-ui.
@glepnir pull now and test. Closing square bracket wasn't escaped properly.
from vim-dadbod-ui.
closed.
from vim-dadbod-ui.
Related Issues (20)
- Table Structure not showing properly. HOT 2
- Store query time per dbout buffer
- Ability to remove, reorder (or sort) preset table helpers
- Move the DBUI section to right HOT 1
- Possible to Add Option for Nvim-Notify to Track Query Time? HOT 4
- Keep the query output open while updating the query HOT 1
- Open query results in a window instead of a buffer
- Feature Request: Enhance Foreign Key Lookup to Consider Current Database Context in `schemas.vim`
- Cursorline and default mappings HOT 2
- DBUI stop working when given a wrong connection HOT 1
- Support for a new database HOT 3
- Table format off when text field includes line breaks HOT 1
- FR: Put views into a separate category
- Are there any options for "edit current entry" when browsing the result of a query?
- Duplicate tag "ic"
- Move Buffer output dropdown to respective database
- Show connection string of database HOT 1
- Oracle database not opening up properly HOT 16
- bind parameter delimiter config HOT 2
- Change `search_path` for session duration?
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 vim-dadbod-ui.