|
|
CREATE MODULE
Usage
Embedded/Interactive/ODBC/JDBC.
Description
If
module-nameis specified in its unqualified form, the module will be created in the schema which has the same name as the current ident.If
module-nameis specified in its fully qualified form (i.e.schema-name.module-name) the module will be created in the named schema (in this case, the current ident must be the creator of the specified schema).A module is simply a convenient enclosure for the collection of one or more routines that are declared as belonging to the module when it is created.
Language Elements
function-definition, see CREATE FUNCTION.
procedure-definition, see CREATE PROCEDURE.
method-definition, see CREATE METHODRestrictions
Two modules with the same name cannot belong to the same schema.
All the functions, procedures and methods declared as belonging to the module must be created in the same schema as the module.
Two functions with the same name can only belong to the same schema if they have different numbers of parameters, or the data types for the parameters differ. (See Mimer SQL Programmer's Manual, Parameter Overloading for more information.)
Similarly, two procedures with the same name can only belong to the same schema if they have different numbers of parameters, or the data types for the parameters differ.
It is not possible to create a synonym for a module name.
Notes
The names of the functions and procedures declared as belonging to the module are qualified by using the name of schema to which they belong and not the name of the module.
Example
@ CREATE MODULE M1 DECLARE PROCEDURE PROC_1() READS SQL DATA BEGIN ... END; DECLARE PROCEDURE PROC_2(IN X INTEGER) MODIFIES SQL DATA BEGIN ... END; DECLARE FUNCTION FUNC_1() RETURNS INTEGER READS SQL DATA BEGIN ... END; SPECIFIC METHOD METH_1 BEGIN ... END; DECLARE STATIC METHOD METH_2 (P1 BOOLEAN, P2 DATE) FOR UDT_1 BEGIN ... END; END MODULE @For more information, see the Mimer SQL User's Manual, Creating Functions, Procedures, Triggers and Modules.
Standard Compliance
|
Mimer Information Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 info@mimer.se |
|
|