persistent class %SQL.DICT.Routine
extends %Persistent
Routine is a generic class that models stored routines - both procedures and functions.
parameter READONLY = 1;
READONLY = 1 means that objects can be created, opened but not saved or deleted.
Tables are projected to SQL as READONLY.
property ODBCcatalog
as %String(MAXLEN="");
ODBCcatalog is a serialized list of the ODBC catalog metadata object.
column | description |
Set $$$PROCodbccatalog($$$pPROC,SCHEMA,PROC)=$lb("",schema,proc,$$$PROCinputparms($$$pPROC,SCHEMA,PROC),$$$PROCoutputparms($$$pPROC,SCHEMA,PROC),$$$PROCresultsets($$$pPROC,SCHEMA,PROC),$$$PROCremarks($$$pPROC,SCHEMA,PROC),0,proc)
catalog | Catalog - normally this is empty |
schema | Schema name |
routine | Routine name |
| |
| |
| |
| |
| |
property ODBCinfo
as %String(MAXLEN="");
ODBCinfo is a $List containing the interface, column count, column metadata for each column, parameter count, and parameter metadata for each parameter.
column | description |
interface | refer to interface property for values |
column count | Number of columns |
columns | one for each column |
|
Column metadata
Name | Description |
ODBCType | ODBC Type |
Precision | |
Scale | |
nullable | NULLABLE (integer) |
label | Column Label (same as Name) |
table | Column Table Name |
schema | Column Schema Name |
qualifier | Column Qualifier Name - NULL |
columnoptions | $Char(1)/$Char(0) string
|
|
position | Option |
1 | isAutoIncrement |
2 | isCaseSensitive |
3 | isCurrency |
4 | isReadOnly |
5 | isRowVersion |
6 | isUnique |
7 | isAliased |
8 | isExpression |
9 | isHidden |
10 | isIdentity |
11 | isKeyColumn |
12 | isRowid |
|
|
parmCount | Number of Parameters |
parameters | one for each parameter |
|
Parameter metadata
ODBCType | ODBC Type |
precision | Precision |
scale | Scale |
nullable | NULLABLE |
colName | Column (parameter) name |
colType | |
|
property PROCID
as %String(MAXLEN=128);
UPPERCASE Routine name
property SCHEMAID
as %String(MAXLEN=128);
UPPERCASE Schema name
property class
as %String(MAXLEN=220);
The name of the class containing the projecting member (query or method).
relationship columns
as %SQL.DICT.RoutineColumn [ Inverse = routine,Cardinality = children ];
All of the columns defined for this routine. That includes the return value, result columns,
input, input-output and output columns. If this routine includes a prepared cursor (currently,
only routines defined as interface = 1 include a prepared cursor) then there will be result columns
in the columns. Otherwise, only returntype, input, input-output and output columns will be present.
These column types (all but result column) collectively form what is often calls the "parameters".
property contextclass
as %String(MAXLEN=220);
The name of the %Library.ProcedureContext subclass prepared for dynamically calling
the routine from the server.
property description
as %String(MAXLEN="");
property executestring
as %String(MAXLEN="");
The COS expression used to call this routine from %SYS.DBSRV
property hidden
as %Boolean;
If true then hidden indicates that this routine is not included by the catalog query.
property idcolumn
as %String(MAXLEN="");
For query procedures, idcolumn is the CONTAINID value.
property idextent
as %String(MAXLEN=220);
For query procedures, idextent is the name of the extent referenced by the type of the idcolumn.
property informixlegacy
as %Boolean;
If true then informixlegacy indicates that return values are returned as a single row result set.
property inputparms
as %Integer;
The number of input parameters declared by the procedure
property interface
as %Integer(VALUELIST=",-2,-1,0,1,2");
cPROCinterface
-2 | Procedure with a return value that may return result sets |
-1 | Procedure without a return value that may return result sets |
0 | Procedure without a return value, no result sets |
1 | query procedure (single static result set) |
2 | function with a return value, no result sets |
property outputparms
as %Integer;
The number of output parameters declared by the procedure
property parmsdirection
as %String(MAXLEN="");
property parmslength
as %String(MAXLEN="");
property parmsobjectcat
as %String(MAXLEN="");
property projected
as %Boolean;
projected is true if this routine is callable as a stored procedure/function. Some queries
are compiled as a stored routine but not callable unless they are defined as SQLPROC.
property remarks
as %String(MAXLEN="");
property resultsets
as %String(MAXLEN="");
property returnval
as %Boolean;
property routine
as %String(MAXLEN=220);
routine is the name of the projecting item - method or query depending on routinetype.
property routinetype
as %String(VALUELIST=",function,query");
routinetype is the projecting item member type - function (aka method) or query.
property schemaname
as %String(MAXLEN=128);
The name of the schema where this routine is defined. The fully qualified routine name is schemaname.sqlname.
property selectmode
as %Integer;
property signature
as %String(MAXLEN="");
property sqlname
as %String(MAXLEN=128);
The SQLNAME of the routine.
property statementtype
as %Integer;
index (idk on SCHEMAID,PROCID) [IdKey];