SQL*Module for Ada Programmer's Guide
Release 8.0

Part Number A58231-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

B
Module Language Syntax

This appendix describes the syntax of Module Language, using syntax diagrams.

For the complete syntax of all SQL statements, including syntax diagrams, see ">PL/SQL User's Guide and Reference.

Module Language Syntax Diagrams

Syntax diagrams use lines and arrows to show how procedure names, parameters, and other language elements are sequenced to form statements. Follow each diagram in the direction shown by the lines and arrows.

In these syntax diagrams, Module Language keywords appear in uppercase; parameters or other variable items appear in lowercase. Delimiters and terminators (such as '(', ',', and so on) appear in their literal form inside circles.

If the syntax diagram contains more than one possible path, you must select the path appropriate to your application.

If you have the choice of more than one keyword or parameter, your options appear in a vertical list. If any of the parameters in a vertical list appears on the main path, then one of them is required. That is, you must choose one of the parameters, but not necessarily the one that appears on the main path.

Single required parameters appear on the main path, that is, on the horizontal line you are currently traveling. If parameters appear in a vertical list below the main path, they are optional, that is, you need not choose one of them. In the AUTHORIZATION clause of the module preamble, the username is mandatory, but the password and database to connect to are optional, as shown in this diagram:

Text description of adaauth.gif follows
Text description of the illustration adaauth.gif

Loops let you repeat the syntax contained within them as many times as you like.

Here is the syntax diagram for a module:

Text description of adamod.gif follows
Text description of the illustration adamod.gif

Thus, a module consists of a preamble, followed by zero or more cursor declarations, followed by one or more procedures.

Preamble

The syntax of the preamble is:

Text description of adapre.gif follows
Text description of the illustration adapre.gif

LANGUAGE Clause

The following diagram shows the syntax of the optional language clause (lang_clause) of the preamble:

Text description of adalang.gif follows
Text description of the illustration adalang.gif

AUTHORIZATION Clause

The following diagram shows the syntax of the AUTHORIZATION clause:

Text description of adaauth.gif follows
Text description of the illustration adaauth.gif

Cursors

The syntax of the cursor declaration is:

Text description of adacur.gif follows
Text description of the illustration adacur.gif

Procedure Definitions

The SQL92 syntax for a procedure definition is:

Text description of adaproc.gif follows
Text description of the illustration adaproc.gif

where the parameter list is defined as:

Text description of adapar.gif follows
Text description of the illustration adapar.gif

Where type_dcl is defined as:

Text description of adatyp.gif follows
Text description of the illustration adatyp.gif

Length L has values: 1< L<32500. n is the size of the array.

You can place the SQLSTATE and/or the SQLCODE status parameters anywhere in the parameter list; they are conventionally shown at the end of the parameter list in this Guide, as indicated in this syntax diagram. You must include either SQLSTATE (recommended) or SQLCODE (for backward compatibility with SQL89). You can include both, in any order. Do not place a colon before the status parameter, and do not include a datatype after it.

WITH INTERFACE CLAUSE

The syntax of a procedure declaration that includes a WITH INTERFACE clause is formally defined as:

Text description of adawith.gif follows
Text description of the illustration adawith.gif

The int_param_formal_name is defined as:

Text description of adaipfn.gif follows
Text description of the illustration adaipfn.gif

The SQL datatype in the WITH INTERFACE clause must be compatible with the corresponding PL/SQL datatype in the procedure declaration parameter list.

The syntax of the mode attribute is:

Text description of adamode.gif follows
Text description of the illustration adamode.gif

If mode is omitted, the value is IN.


Go to previous page Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback