%Library.ProcedureContext

class %Library.ProcedureContext extends %Library.IProcedureContext

Stored procedure context

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties

property context as %RawString [ Private ];
Property methods: contextGet(), contextIsValid(), contextSet()
property static as %Boolean [ InitialExpression = 0 ];
Property methods: staticDisplayToLogical(), staticGet(), staticIsValid(), staticLogicalToDisplay(), staticNormalize(), staticSet()

Methods

method %NextResult() as %RegisteredObject [ Language = objectscript ]
Called to return the next resultset object. This also removes the reference to the existing object so it can cleanup and close itself
private method %OnClose() as %Status [ Language = objectscript ]
This callback method is invoked by the %Close() method to provide notification that the current object is being closed.

The return value of this method is ignored.

method AddContext(pContext As %Library.IProcedureContext, propagateerror As %Boolean = 1) as %Library.Status [ Language = objectscript ]
AddContext() is for nesting procedure context objects. If one procedure invokes another procedure and the results of calling the nested procedure are to be returned to the caller of the outer procedure then simply invoke AddContext on the context object of the outer procedure, passing the context object of the inner procedure as an argument, pContext. If the propagateerror argument is true then any error encountered by the nested procedure will be reported as an error to the caller of the outer procedure.
method AddPrivateTable(pTable As %XSQL.DS.TempTable) [ Language = objectscript ]
AddPrivateTable() This method will register a temporary table object. Only registered table objects are usable by dSQL. The TTNI property is the to index and is not set up here since the actual table (referenced by pTable) has no clue as to the source language table name. That must be done by the source language.
method AddResultSet(rs As %Library.IResultSet) [ Language = objectscript ]
AddResultSet() - add a new result object to the context object. Results are accessible by callers of the procedure through the %NextResult/%CurrentResult interface.
method CloseCurrentResult() as %Status [ Language = objectscript ]
Close the current resultset object, used to allow the cleanup code to run and the cursor to close
method DumpResults(pDelimiter As %String = " ") [ Language = objectscript ]
DumpResults() This method writes all of the results to the current device. The pDelimiter parameter is passed to the result set's %Print() method.
method NextResult() as %RegisteredObject [ Language = objectscript ]
Called to return the next resultset object. This also removes the reference to the existing object so it can cleanup and close itself
method RemovePrivateTable(pTableName As %String(MAXLEN="")) [ Language = objectscript ]
RemovePrivateTable() will remove the private table name from the current context object or the process context object. The storage offset information remains to that any existing result sets will still be valid. However, If another instance of a private table with the same name is created any result sets against the prior private table may become invalid.
method Reset() as %Status [ Language = objectscript ]
method ResolveTableName(pTableName As %String(MAXLEN=""), ByRef pContext As %Library.ProcedureContext = "", pDDLFlag As %Integer = 0) as %String [ Language = objectscript ]
ResolveTableName will locate a temporary table registered in either the current object (usually equates to %sqlcontext) or in the process context object (%processcontext). The temporary table name passed into this method is the host language name such as #my_temp in TSQL or a normal temporary table name in Informix. This name is the one bound to the actual name in the TTNI (temporary table name index) by the host language procedure. If the table name is not found in TTNI, either local(current object) or global (%processcontext) then the name submitted is returned an no context is returned in the byref pContext argument.

Inherited Members

Inherited Properties (Including Private)

Inherited Methods (Including Private)

Subclasses

Feedback