Generating Code

From RapidSQL
Jump to: navigation, search

Go Up to Session 3: Scripting

By providing several code generation and assistance options, Rapid SQL makes cross-platform development easy for developers of all experience levels.

Note: The following examples build on the SAMPLE_DATASOURCE registered earlier in this Evaluation Guide. These examples can be applied to any registered datasource for any of the supported platforms.

Code Generation Facility

The Code Generation Facility can be used to create complete procedures, functions or packages revolving around views or tables.

  1. From the menu, open Tools > Code Generation Facility.
  2. Select the SAMPLE_DATASOURCE datasource, the AdventureWorks database, and the Purchasing schema from the dropdown list boxes.
    af0f5c70.jpg
  3. Select the Vendor table, Name as the input column and all columns for output.
    af0f5c75.jpg
  4. Select Select as the code option.
    af0f5c7a.jpg
  5. Select a file to save the generated script and check Open.
    af0f5c7f.jpg
  6. Click OK and the DDL to create the procedure will be generated and displayed in an editable window, called the DDL Editor. You can edit the name of the new procedure and any of the generated code at this time. Name the new procedure sample_select_vendors.
  7. Click on the Execute button to submit the DDL and create the procedure.
    af0f5c85.jpg
    The indicated file will be saved on the selected directory.
Note: No SQL statement coding is required to generate complete stored procedures and packages. If applicable, Rapid SQL allows all generated code to be previewed and edited to fit any development need.

Proceed to Right-click feature.