Thanks to new SHOW PROCEDURES ALL, we was able implement Function Browser in the SQL Editor of Valentina Studio.
This Function Browser contains a list of system function and used defined stored procedures and functions listed by categories such as:
* String Functions
* Math Functions
* DateTime Functions
* User Defined Functions
* User Defined Procedures
For each function you can see its declaration and description. When you have found required function just click INSERT button to insert its prototype into SQL Editor’s query.
Another awesome and very unique for DB GUI TOOLs feature is – that you can specify for your Stored Procedures and Functions own Categories and Comments as PROPERTIES of Procedures. They will be stored in the Schema of your database in the .vdb file and later SHOW PROCEDURES ALL will return this info to VStudio. So VStudio will be able to show your procedures in a nice way.
You can set these properties using ‘SET PROPERTY SQL’ command or, even simpler, assign them in the Inspector for selected Procedure(s).
Step By Step Example
On the following screen you can see example, how you can select few existed Stored Procedures and assign for them some Category:
Now lets switch back to SQL Editor and open Function Browser. You can see your new group of procedures is here:
Now you can assign for selected User Defined procedure its Description (i.e. COMMENT property) using button “Change Description…”
And finally you can see this comment applied as Description to your procedure in the Function Browser!
When you have choose function, you can double click its name or click button “Insert” to insert name of the function with its arguments into SQL Editor. Note, that if you will move mouse over name of that function in the SQL Editor, you will see tooltip with description, declaration and may be body. For example, on the following picture you can see comment that we have just added as green letters on top:
- List of system defined functions is NOT hard-coded into Valentina Studio code. This means that the same version of Valentina Studio can connect to Valentina Servers of different versions (e.g. 4.6 and 5.0) and for 5.0 we will get up to date list of functions with all new future added.
- You can define own categories for your stored procedures. Then members of your team can see them instead of few hundreds list with all custom procedures.
- You can define own comments to your UDFs and members of your team can read/edit them in a nice way.