Studio 3T 2022.7 and later supports the creation and display of aliases and notes for items in the Connection Tree. It allows items in the tree to have an alternative name (alias) and have text, such as documentation, attached to it (notes).
You can only create aliases and notes for:
- Databases
- Collections
- Views
- GridFS Buckets
Connections already have a user customizable name, editable in the Connection Manager.
Aliases
An alias is a preferred alternate name for a collection, view, or database. An alias will display in place of the actual name (which will then display in parentheses after the alias name). Aliases allow a user to customize how Studio 3T presents connection tree items to them.
Showing an alias “cheese vending” for the collection cheeseshop.
Note that although a database, collection, view or bucket may have an alias, when addressing it in IntelliShell, you need to use the actual name, not the alias.
In the connection tree, items are arranged in alphabetical order. Setting an alias on either a collection, view, database or bucket will see that alias used (instead of the actual name) to position that item among its peers in the tree.
Adding an Alias
To add an Alias on a Connection Tree item, select the item in the tree and then use the right-click menu and move to Aliases / Notes:
This menu changes according to the current state of the item. Where the item does not have an alias, the menu will show Add Alias. Select this item to display the Add Alias dialog:
Enter your desired alias and click OK.
Once an Alias has been created for an item, you can bring up the Aliases / Notes: menu to select other options:
Edit Alias
Select Edit Alias from the Aliases / Notes: menu to display the Edit Alias dialog.
Change the alias in the text field and click OK to update the alias.
Remove Alias
Selecting Remove Alias from the Aliases / Notes: menu will immediately remove the alias from the item in the connection tree.
Copy Alias
To copy the text of an alias, select Copy Alias from the Aliases / Notes menu. This will copy only the text of the alias to the clipboard, in the same way as the Copy Name menu option in the right-click menu will copy the connection tree item’s actual name to the clipboard.
Alias Tips
Emoji in Aliases
Aliases can use emoji to add visual significance to an aliased item. While it is possible to use emoji in the actual names of databases, collections, and views, those emoji have to be escaped when using the item in IntelliShell, making scripts harder to read. By using the alias for emoji enhanced presentation, you can continue to use the easier to read actual name in scripts.
Notes
Notes provide the opportunity to append a free-form block of text to an eligible item. While aliases change the presentation of a collection, view or database in the connection tree, adding a note to one of these elements only shows as a notepad icon next to the item:
When you hover over an item with a notepad icon, the tooltip will include the text from the note as well as the usual statistics for that collection, view, or database.
Adding a Note
To add an Note on a Connection Tree item, select the item in the tree and then use the right-click menu and move to Aliases / Notes:
This menu changes according to the current state of the item. Where the item does not have a note, the menu will show Add Note. Select this item to display the Add Note dialog:
Once a Note has been created for an item, you can bring up the Aliases / Notes menu to select other options:
Edit Note
Select Edit Note from the Aliases / Notes menu to display the Edit Note dialog. You can change the text and save it by clicking Ok.
Remove Note
Selecting Remove Note from the Aliases / Notes menu will immediately remove the note from the item in the connection tree.
Copy Note
To copy the text of a note, select Copy Note from the Aliases / Notes menu. This will copy only the text of the note to the clipboard so you can paste it elsewhere.