Documentation
 
 
 

17.4. Creating Database Server Programs

Developer Studio comes with templates to facilitate you with creating packages, procedures, functions and triggers. These templates provide you with the basic body and syntax for creating any of the above mentioned database objects, so you simply need to plug in your own code for customization and be up and running. The following section discusses these four templates in detail.

17.4.1. Creating Packages

To create a new package, simply right click on the Packages node and select Create Package, as shown below:

An SQL Interactive window will appear containing the basic syntax for creating a package. The following screenshot displays the template in action.

17.4.2. Creating Procedures

To create a new procedure, simply right click on the Procedures node and select Create Procedure, as shown below:

An SQL Interactive window will pop-up containing the template for creating a procedure. The following screenshot displays this template.

17.4.3. Creating Functions

To create a new function, simply right click on the Functions node and select Create Function, as shown below:

After this you will be presented with a basic function body, so you can plug in your relevant logic and create your function. The following screenshot displays the template:

17.4.4. Creating Triggers

To create a new trigger, simply right click on the Triggers node and select Create Trigger, as shown below:

You will be presented with a basic template for creating an edb-spl trigger. This is shown in the following screenshot:

17.4.5. Debugging Programs

Developer Studio now comes with integrated support for EnterpriseDB PL Debugger which gives developers and DBA's the ability to debug stored procedures and functions. It supports debugging in the following ways:

  • Selecting a function or stored procedure to debug

  • Typing in the OID of the function or stored procedure to debug

EnterpriseDB PL Debugger can be invoked by either:

  • Going to Tools->PL Debugger, or

  • Clicking on the icon in the toolbar.

  • Right clicking on the program that the user wishes to debug and selecting the appropriate program option, e.g. Debug Function for functions or Debug Procedure for procedures.

For more information on debugging please refer to the EnterpriseDB PL Debugger chapter.

17.4.6. Setting Global Break Points

Developer Studio now comes with integrated support for Global Break Points. Global Break Points can be set in the following two ways.

  • Going to Tools->Set Global Break Point, or

  • Clicking on the icon in the toolbar.

  • Right clicking on the program that the user wishes to set the global break point against and selecting the Set Global Breakpoint option.

For more information on Global Break Points please refer to the EnterpriseDB PL Debugger chapter.

 
 ©2004-2007 EnterpriseDB All Rights Reserved