Group

Organize and manage multiple database connections by grouping them in DBCode for easier navigation and workspace clarity.

Grouping Connections in DBCode

Grouping connections in DBCode allows you to categorize and organize multiple connections, making it easier to manage databases across different environments like development, testing, and production.

Creating a Group

  1. Open DBCode in Visual Studio Code:

    • Launch Visual Studio Code and click on the DBCode icon in the Activity Bar (usually located on the left).

    dbcode icon

  2. Select Connections for Grouping:

    • In the DBCode connections pane, hold down the Ctrl key and select two or more connections to include in the group.

    • Click the Group icon from the Connections Toolbar.

    group

    • A prompt will appear asking you to name the group.

    group name

  3. Name the Group:

    • Enter a name for the group (e.g., Development, Testing, Production) and press Enter.
    • The selected connections will now appear under the new group, making them easy to locate and manage.

    group created

  4. Drag and Drop into a Group:

    • To add a connection to an existing group, simply drag it from the main connections list and drop it onto the desired group.
    • The connection will now belong to that group.
    • Connections can also be dragged out of a group, or into another group.

Renaming a Group

  1. Find the Group:

    • In the DBCode connections pane, locate the group you want to rename.
  2. Rename the Group:

    • Right-click on the group name and select Rename Group from the context menu, or click the Rename Group icon next to the group name.

    • Type the new name and press Enter to save.

    rename group

    This feature helps keep group names relevant as projects evolve.

Removing a Connection from a Group

  1. Navigate to the Grouped Connection:

    • Go to the group in the DBCode connections pane and locate the connection you want to remove.
  2. Remove the Connection:

    • Right-click on the connection and select Remove from Group.

    • Alternatively, drag the connection out of the group and drop it into the main connections list.

    • The connection will now appear in the main list, outside of any group.

    remove from group

    This allows you to reorganize connections without deleting them.

Deleting a Group

  1. Locate the Group:

    • Find the group you wish to delete in the DBCode connections pane.
  2. Delete the Group:

    • Right-click on the group name and select Delete Group, or click the Delete Group icon next to the group name.

    delete group

    • Confirm the deletion by clicking Yes when prompted.

    confirm prompt

    Deleting a group does not delete its connections; instead, the connections are moved back to the main list.

Grouping connections in DBCode provides a structured, organized workspace for managing multiple database connections efficiently, supporting quick access and ease of navigation. The ability to drag and drop connections offers even greater flexibility in managing your database connections.