Skip to content

Support for Groups in Connections File #311

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

orlovm
Copy link

@orlovm orlovm commented Mar 2, 2025

Support for Groups in Connections File

This MR adds support for groups in the connections file and closes #135.
All changes are fully backward compatible with existing connection files.

New Structure

[
    {
        "name": "this_is_a_group",
        "connections": [
            {
                "url": "postgres://postgres:postgres@localhost:5432/postgres",
                "name": "this is a nested connection"
            }
        ]
    },
    {
        "url": "postgres://postgres:postgres@localhost:5432/users",
        "name": "users"
    }
]

Implementation Notes

No additional group manipulation commands were implemented.
Grouping is handled naturally by prefixing connection names with the desired group path when using :DBUIAddConnection.
Groups could be renamed and deleted as usual connection.

image

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 holding this for so long.
Can you rebase from master and fix the conflicts? There were some changes in the rendering logic from the previous PR.

@orlovm
Copy link
Author

orlovm commented Mar 26, 2025

Done!
I waited two years for someone to implement this before doing it myself, so waiting for a review is no big deal.
BTW, this is one of my favorite and most used plugins—thanks for it!

@orlovm orlovm requested a review from kristijanhusak March 26, 2025 21:15
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.

Support for Groups in connection file?
2 participants