Function Nodes
This section covers the following topics:
How Function Nodes Work
A Function node is a child of the Functions node. Each of these child Function nodes has a set of child parameter nodes.
In addition to PL/SQL functions, Java function wrappers are included.
Double-clicking on a function node opens the PL/SQL editor and displays the PL/SQL code.
A function with an error is indicated by a red x in the function icon.
To fix the error, open the function code in the PL/SQL editor, make the required changes and save the changes to the database. If the function has no errors, the x is removed from the function node.
Functions that have been compiled with debug information have DBG embedded in the icon.
To perform actions on this node: right-click the node and from the menu, choose the appropriate command. To view the node's properties, select the node and/or click Properties in the node's menu.
Menu Options
Menu Option | Description |
---|---|
Edit |
Displays the function code in the PL/SQL Code Editor. Alternatively, you can double-click the Function node to display its code in the PL/SQL Code Editor. If the database object associated with the node was deleted from the database, you will be asked if the node needs to be deleted from the Server Explorer.If the body of the function is WRAPPED, a warning message will be displayed before the PL/SQL editor window is opened, with the wrapped text. When you make changes to the wrapped text and try to save the changes, you will be prompted to overwrite the wrapped text with your changes. |
Query Window |
Opens the Query Window so that you can execute SQL and PL/SQL queries from Visual Studio. |
Compile |
Performs the following actions:
See PL/SQL Compiler Settings Options Page for compile settings. |
Compile Debug |
Compiles the function with debug information. This is required before PL/SQL code can be debugged. See Compiling a PL/SQL Program with Debug Information. See PL/SQL Compiler Settings Options Page for compile settings. |
Run |
Executes the function using the Run dialog box. |
Run Debug |
Starts debugging the function and runs to the breakpoint. See Debugging a PL/SQL Program Directly. |
Step Into |
Begins debugging the function and stops at the line of code. See Debugging a PL/SQL Program Directly. |
Generate Create Script |
Writes the function definition to a |
Generate Create Script to Project |
Generates the function definition to a . If multiple objects in Server Explorer are selected, a master SQL script is created in the Oracle Database Project Scripts folder. This master script contains calls to individual child SQL scripts (one for each schema object) generated into the various schema object folders and this master script is ordered with dependencies taken into consideration. If there are multiple open Oracle Database projects, Visual Studio prompts you to select the project to add the script to. This operation can also be performed by dragging and dropping the Server Explorer node(s) directly onto a database project folder. See Managing Oracle Script Files for more information. Note: Oracle Database Project Version 2 projects are not supported. To add scripts to this project type, use Import Schema or Add Existing Item menu items on an Oracle Database Project Version 2 project folder, or use the Schema Compare tool. |
Dependencies and References |
Opens the Dependencies and References Viewer for viewing the dependencies that this object has on other database schema objects. |
Privileges |
Opens the Grant/Revoke Privileges dialog box. |
Copy |
Copies the selected function to the clipboard for pasting to Visual Studio designers. This provides the same functionality as dragging and dropping the procedure onto the Visual Studio designers |
Delete |
Deletes the function. |
Refresh |
Updates the Function node and its associated parameter nodes. If the database object associated with the node was deleted from the database, you will be asked if the node needs to be deleted from the Server Explorer. |
Properties |
Displays the Properties window. |