| QCGU: Quest CodeGen Utility | ||
|
What is Codebar?Codebar is an "always on top" toolbar designed to give you quick access to code that was generated by QCGU, in particular the customized PL/SQL code library generated by QCGU Quick Start.
Codebar is designed to fit comfortably and unobtrusively within your favorite IDE. In the following screenshot, for example, I have positioned Codebar within the toolbar section of Toad*:
Example 1Let's take a look at how you can use Codebar to accelerate your development and improve code quality. Suppose I am building code around the EMPLOYEE table. Specifically, I need to write a procedure to update the salaries of all employees in a given department. First, I will click into the Object Selector, find EMPLOYEE and make that the current object:
Next, I need to write a parameter list that passes in the department ID and salary. So I click on the Filter icon and type "in parameter" to help me quickly identify relevant code.
I then click into the Script Selector field and drill down to a script that looks just right:
As soon as select it, the Preview and Copy icons light up. Since this is the first time I have used this script, I will click on it to preview the content.
That code looks good, so I click on Copy, click into my edit window and paste in the contents. I then trim the code down to what I need: two parameters declared with anchored datatypes. So I have followed best practices without paying the price of extra typing!
Example 2Now let's do something more substantial. I need to find all the employees in the specified department and update their salary. Department ID is a foreign key on the table. So I will set the filter in Codebar to "foreign" and then see what scripts are available for that keyword. I am also going to be querying lots of data, so I figure it would be good to take advantage of BULK COLLECT. This one looks promising:
I can read the description by clicking on the "open book" icon:
I like what I read, so I click on the copy icon, move my cursor into my edit window, and Control-V to paste in the contents.
With those few, quick steps and clicks, I now have a substantial body of non-trivial code with which to work: my query not only uses BULK COLLECT, but also fetches with the LIMIT clause and correctly checks the COUNT of the collection to determine if I have fetched the last of the rows in this result set.
Your savingsThis one script alone can easily save you a half hour of typing and debugging. You can be confident that the generated code is both correct and implements best-practices. *Toad is a registered trademark of Quest Software |
||
|
©2004-2007 Quest Software. All Rights Reserved. |
||