I realize there is already a feature request for code folding, but I couldn't figure out how to add my 2 cents to it.
Being able to code fold is the main thing holding me back from fully adopting DBVisualizer as my only SQL developer tool. In SSMS, there is a purchasable add-in (SSMS Tools Pack) that adds code folding regions to the UI. As the developer, I can add my own regions to any SQL code by wrapping it in a special comment that the add-in looks for. It is similar to the way Microsoft Visual Studio does it out of the box for all languages. To start the fold, just add "--#region PLACE HUMAN COMMENT HERE". To end the fold just add --#endregion. The add-in parses the SQL first and allows the user to fold/unfold that region. I have attached images from SSMS
Since "--" as a comment line is ANSI standard (at least I think it is), it seems this could be used for any SQL for any driver. It would just be the UI looking for this signature. The actual SQL parser would ignore the lines since they are just comments.
Again, just my 2 cents.
Yes I am aware of that feature. The problem is the folding doesn't get stored in the file I am editing. After I close out a file all folds are gone. Also, as soon as I unfold that fold is gone too. So even in the live file remembrance of the fold is gone.
I do a lot of ETL in SQL and having regions folded out makes it much easier to focus on the sections I need. Folding makes for a good abstraction layer.
Okay, I understand. I have opened a ticket for us to look into this.
DbVisualizer offers code folding, but it is based on selections rather than special comments:
Not sure if you were aware of that feature.