This page is used to specify the database, driver, object type and script:
Database. Use the drop-down list of repository objects to select the database. The driver, specified in settings of the selected database, is set automatically on changing a database.
Physical Name. In the field the physical object name (procedure or function), which is created on the DBMS server and which is corresponding with the one, created in the repository is specified. By default it matches the identifier.
Driver. Select the driver type in the drop-down list. For details about available drivers see the Supported DBMS section. The default driver used by the selected database is shown in bold in the list. If required, it is available to select another driver, and determine the SQL query text for this driver. It is relevant if the repository is expected to be used on servers with various DBMS types and settings of repository database will be changed.
NOTE. Creating of procedures and functions is not available in SQLite DBMS because such object type is missing in this DBMS.
Object Type. Select type of created object in the drop-down list:
Procedure.
Function.
Script. In the field enter the header part, containing input and output parameters if required and procedure (function) body. Features of working with the field:
The script text should be written in the SQL, which syntax depends on the selected DBMS.
The header part, containing initialization code and physical name is generated automatically. They should not be specified in the script.
Create a parameter with the Function Result value for the function.
The description of the parameters of the same type (input and output) should be in the same order as they are created on the Object Parameters page.
Example of creating function on DBMS Oracle
Example of creating procedure on DBMS Oracle
NOTE. If the PostgreSQL driver is selected, the first string of the table must contain the list of parameters and it must be in one string.
Apply for All DBMS. The button enables the user to set the given text to all DBMS. Clicking this button returns a request to confirm the operation. Confirmation is required if at least one driver other than the current one, has non-empty query text.
Load from Base. The button is used to refresh procedure or function text from base. Clicking this button returns a request to confirm the operation. Click Yes for the script to be restored from database.
See also: