Favourites behave unpredictably when using object filters
a
anonymous
started a topic
over 9 years ago
[This topic is migrated from our old forums. The original author name has been removed]
*Background*
--------------------
I like to be able to type the name of my tables/views/SProcs, etc and have DBVis jump to them in the list without having to type dbo. every time so I have defined object labels which change each object from the default dbo.TableName to TableName (dbo).
e.g. For tables this means a change in the Filter Editor to +${getTables.TABLE_NAME} (${getTables.TABLE_SCHEM})+ instead of the default +${getTables.TABLE_SCHEM}.${getTables.TABLE_NAME}+.
This works great for manual navigation but causes my favourites list to behave weirdly.
*Setup*
------------
My historical favourites added by the Add to Favourites button all map to paths using the original dbo.TableName syntax so for the purposes of experimentation I changed a few paths to TableName (dbo) in my favorites.xml file so I could do the comparison below.
*Issue 1: Opening DBVisualiser then opening a favourite instantly*
-------------------------------------------------------------------------------------------
DBVisualiser recognises the original dbo.TableName favourite syntax and opens any favourites created with those paths without issue. Even though I have Connect All on Startup enabled, DBVisualiser ignores my custom labels in this case and opens the favourite.
The objects I converted to my custom label syntax in favorites.xml *do not* open when double-clicked however.
*Issue 2: Focussing an opened favourite in the object tree and reconnecting*
---------------------------------------------------------------------------------------------------------
After opening a favourite with the original label syntax though, if I then click the hyperlink to focus the favourite inthe object explorer I can see my custom labels are ignored and they are displayed as dbo.TableName despite my filter being ticked in the filter dropdown above the object explorer. The moment I hit Reconnect though, my custom labels get applied to the object explorer.
After my custom labels are applied via a reconnect the behaviour of the favourites tab changes. Now it only opens any favourites defined in favorites.xml with my new TableName (dbo) syntax. Any favourites using the original dbo.TableName syntax are no longer recognised when double-clicked.
*Issue 3: Opening DBVisualiser then expanding the tables list before opening a favourite*
--------------------------------------------------------------------------------------------------------------------------
If I open DBVisualiser and expand my table list *before* I go to the favourites tab it behaves like Issue 2 after the refresh.
In other words at this point the favourites tab will only open any favourites defined in favorites.xml with my new TableName (dbo) syntax. Any favourites using the original dbo.TableName syntax are not recognised when double-clicked.
*Issue 4: Disconnect all reverts to the original behaviour*
------------------------------------------------------------------------------
If I click Disconnect All then use the favourites tab I find it has reverted to the behaviour in Issue 1.
In other words at this point the favourites tab will only open any favourites defined in favorites.xml with my original dbo.TableName syntax. Any favourites using the new TableName (dbo) syntax are not recognised when double-clicked.
*Summary*
-----------------
The behaviour of the favourites changes depending whether the tables I want to open have already been expanded in the object explorer.
I have no consistent label syntax I can use in favorites.xml that will work whether I have the table list expanded or not. Right not the only (and very hacky) workaround is to leave the paths defined in favourites.xml using the original syntax and click Disconnect All prior to opening any favourites.
It seems to me the logical solution is for DBVisualiser to always use the original object label syntax for the paths in favorites.xml when opening a favourite but also to ensure that object explorer *always* shows any custom labels whenever they are enabled. Enabling a custom label syntax should never change the validity of the object paths in favorites.xml.
I am using DBVisualiser 9.2.8 on Windows 7 x64.
*Bonus forum issue*
-----------------------------
The syntax for underlining, h1 shown on the right of the forum post editor doesn't seem to work when the post is actually created. Bold, italics and horizontal rule work as advertised though. It would be nice to paste pre-formatted code snippets but there seems to be no syntax advertised for that.
Re: Favourites behave unpredictably when using object filters
Hi Vince,
It seems all this boils down to the x.y formatting of object names for SQL Server. We do have plans to look into improving the SQL Server support in the next feature version to remove the compound x.y names and instead show x as an parent node for y in the objects list. A lot of users have requested this change and it will also better match how other databases are presented in DbVisualizer.
Would this solve the issues you reported?
Regards
Roger
a
anonymous
said
over 9 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Favourites behave unpredictably when using object filters
Hi Roger,
Thanks for the quick response. It certainly sounds like that would address the specific issue but perhaps not in the most ideal way for all customers.
For us it would be fine but that's because we currently have most of our tables in the dbo schema.
For companies with tables categorised into lots of schemas though this might become cumbersome to navigate the object explorer as you'd have to expand the correct schema prior to using Search For to jump to the object you want (when you want to quickly jump to a table by name rather than open something in favourites).
I would suggest this makes sense as an optional preference so individual users can group by schema or not, as best fits their database structure.
I think one foolproof way to resolve this issue without needing to group tables into a schema container is to ensure DBVisualizer stores the object path only using the default object label syntax. This path could then be used when storing new favourites, opening favourites and anywhere else an object path is needed internally.
In addition to the "real" object path though DBVisualizer could store a Display Path (replace with appropriate terminology) that impacts only on the visual rendering of the labels in the object tree and in the Search For functionality in the object explorer.
Of course, I've no idea how cleanly such an approach fits into the internal architecture of DBVisualizer.
Regards,
Vince
P.S. As a somewhat related feature request, if your grid widgets support hyperlinks, it would be hugely beneficial if the grid that opens when you double-click the Tables container in a database could allow you to jump to the table when you click on an object name. The Quick Filter box in there provides a great way to identify tables via partial name search but currently you then have to find them manually via Object Explorer once you've identified their names.
Roger Bjärevall
said
over 9 years ago
[This reply is migrated from our old forums.]
Re: Favourites behave unpredictably when using object filters
HI Vince,
Thanks for your comments. These will certainly be useful when we start looking into this area.
For your last comment on:
"P.S. As a somewhat related feature request, if your grid widgets support hyperlinks, it would be hugely beneficial if the grid that opens when you double-click the Tables container in a database could allow you to jump to the table when you click on an object name. The Quick Filter box in there provides a great way to identify tables via partial name search but currently you then have to find them manually via Object Explorer once you've identified their names."
In the Tables grid you can select entries in the list and chose Open in New Tab from the right-click menu to show the target tables. Is this what you are looking for?
Regards
Roger
a
anonymous
said
over 9 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Favourites behave unpredictably when using object filters
Thanks Roger - that's indeed what I was looking for and it works great. I just hadn't noticed the menu option for it.
anonymous