Skip to content

Conversation

entropitor
Copy link

Fixes #104

Copy link
Owner

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, and sorry for the late review!

Generally looks good, but we should consider handling connection strings that already have a db name inside, and show results differently.

\ 'requires_stdin': v:true,
\ }

let s:mongodb_dbs_query = '"\n" + db.adminCommand("listDatabases").databases.map(x => x.name).join("\n")'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to consider the case where the database name is defined in the url, for example mongodb://localhost:27017/my_test_db.
In that situation, we should just show table names.
We already do similar thing for mysql/mariadb here. We can convert that to a hash map and consider mongodb and mongodb+srv as part of that.

I added this myself to see how it looks, and noticed that table names in drawer got db. prepended, like db.users. We can probably solve that in the schemes_tables_query somehow.

@mosheavni
Copy link

any news with that?
It could greatly improve the dadbod-ui mongo experience.

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

Successfully merging this pull request may close these issues.

switch mongo db

3 participants