Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [%SQL] >  [DICT] >  [Routine]
Private  Storage   

Routine is a generic class that models stored routines - both procedures and functions.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 30 1


Summary

Properties
ODBCcatalog ODBCinfo PROCID SCHEMAID class
columns contextclass description executestring hidden
idcolumn idextent informixlegacy inputparms interface
outputparms parmsdirection parmslength parmsobjectcat projected
remarks resultsets returnval routine routinetype
schemaname selectmode signature sqlname statementtype

Methods
%AddToSaveSet %AddToSyncSet %BMEBuilt %CheckConstraints
%CheckConstraintsForExtent %ClassIsLatestVersion %ClassName %ComposeOid
%ConstructClone %Delete %DeleteExtent %DeleteId
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Exists
%ExistsId %Extends %GUID %GUIDSet
%GetLock %GetParameter %GetSwizzleObject %Id
%InsertBatch %IsA %IsModified %IsNull
%KillExtent %KillExtentData %LoadFromMemory %LockExtent
%LockId %New %NormalizeObject %ObjectIsNull
%ObjectModified %Oid %OnBeforeAddToSync %OnDetermineClass
%Open %OpenId %OriginalNamespace %PackageName
%PhysicalAddress %PurgeIndices %Reload %RemoveFromSaveSet
%ResolveConcurrencyConflict %RollBack %Save %SaveDirect
%SaveIndices %SerializeObject %SetModified %SortBegin
%SortEnd %SyncObjectIn %SyncTransport %UnlockExtent
%UnlockId %ValidateIndices %ValidateObject


Parameters

• parameter READONLY = 1;
READONLY = 1 means that objects can be created, opened but not saved or deleted. Tables are projected to SQL as READONLY.

Properties

• property ODBCcatalog as %String(MAXLEN="");
ODBCcatalog is a serialized list of the ODBC catalog metadata object. 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)
columndescription
catalogCatalog - normally this is empty schemaSchema name routineRoutine 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.

columndescription
interfacerefer to interface property for values
column countNumber of columns
columnsone for each column
Column metadata
NameDescription
ODBCTypeODBC Type
Precision
Scale
nullableNULLABLE (integer)
labelColumn Label (same as Name)
tableColumn Table Name
schemaColumn Schema Name
qualifierColumn Qualifier Name - NULL
columnoptions$Char(1)/$Char(0) string
positionOption
1isAutoIncrement
2isCaseSensitive
3isCurrency
4isReadOnly
5isRowVersion
6isUnique
7isAliased
8isExpression
9isHidden
10isIdentity
11isKeyColumn
12isRowid
parmCountNumber of Parameters
parametersone for each parameter
Parameter metadata
NULLABLE
ODBCTypeODBC Type
precisionPrecision
scaleScale
nullable
colNameColumn (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
-2Procedure with a return value that may return result sets
-1Procedure without a return value that may return result sets
0Procedure without a return value, no result sets
1query procedure (single static result set)
2function 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;
selectmode is the selectmode defined for the routine. The values are 0 = logical, 1 = odbc , 2 = display, and 3 = runtime.
• property signature as %String(MAXLEN="");
• property sqlname as %String(MAXLEN=128);
The SQLNAME of the routine.
• property statementtype as %Integer;

Indices

•index (idk on SCHEMAID,PROCID) [IdKey];


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.