Skip to main content

%ResultSet.Custom

abstract class %ResultSet.Custom extends %Library.IResultSet

This class has been superseded. It will remain for compatibility with existing code and samples. We recommend using %SQL.CustomResultSet.

Method Inventory

Methods

method %ExecuteParametersGet()
method %Get(colname As %String = "") as %Library.String
%Get(colname) Get the value of the property whose column name is colname.
method %GetData(colnbr As %Integer = 0) as %Library.String
%GetData() Returns the value of the column referenced by colnbr. Object values are not swizzled automatically.
classmethod %GetSerializedMetaData()
Get the serialized %Metadata property value. Used by both the instance method %MetadataGet and the %PrepareMetaData class method.
method %MetadataGet()
Override the %Metadata property's Get() method.
final method %OnNew(ByRef returnError As %SYSTEM.Error, pRuntimeMode As %Library.Integer = $zu(115, 5)) as %Library.Status
Inherited description: This callback method is invoked by the %New() method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

classmethod %Prepare(queryId As %String(MAXLEN=""), ByRef %returnError As %SYSTEM.Error, %importPackages As %CacheString = "", %args...) as %Library.IResultSet
%Prepare() This method is different for each type of result set class. This method has two tasks. First, instantiate the correct concrete result set class. Think of the first parameter, queryId, as being an "index key value" that is used to lookup the correct query implementation. For non-cached (static) queries this is simply the name of the class that implements the query, i.e. the %IResultSet interface. The second task is to prepare the resulting object for data retrieval by the caller which is done in %OnNew. The assumption is that if the query requires any parameters then the actual arguments are all literal or public variables. queryId the concrete subclass of %IResultSet that implements the desired query. For dynamic cached results this value is generally the query text that can be parsed, a hashed value computed and the cached result implementation class looked up in the query cache index. %returnError If an error occurs this is returned by reference and is a %SYSTEM.Error object with properties set to describe information about the error %importPackages This is a comma delimited list of packages to import. This is only relevant if the result set implementation is generated and the query source might include unqualified names. The import packages list is used to resolve package/schema names for unqualified names.
classmethod %PrepareMetaData(class As %String(MAXLEN=""), ByRef returnError As %SYSTEM.Error = "", importPackages As %CacheString = "") as %ResultSet.MetaData
%PrepareMetaData is similar to %Prepare except that no result set is instantiated. This method returns a %ResultSet.MetaData object. Be aware that the implementation of this method might cause the result set to be instantiated but that is up to the result set class itself and no result set is actually returned by this method - only metadata. class This is the custom result set class returnError If an error occurs this is returned by reference and is a %SYSTEM.Error object with properties set to describe information about the error. %returnError.Status contains the %Status value. importPackages This is a comma delimited list of packages to import. This is only relevant if the result set implementation is generated and the query source might include unqualified names. The import packages list is used to resolve package/schema names for unqualified names.
method %SendODBC() as %Library.Integer
Fetch and send a series of rows for the ODBC/JDBC server. For internal use only.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab