class %ResultSet.Result extends %Library.IResultSet

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

Simple resultset object that does not contain any rows, but just contains the result information

Method Inventory (Including Private)


parameter COLUMNCOUNT = 0;


method %Display(pDelimiter As %String = $Char(9)) as %Library.Status [ Language = objectscript ]
Display the contents of this object on the current device
method %Get(colname As %String = "") as %Library.String [ Language = objectscript ]
Returns the value of the column with the name name in the current row of the result set.

If name is not a valid column name, this method returns an empty string.

method %GetData(colnbr As %Integer = 0) as %Library.String [ Language = objectscript ]
Returns the value of column n in the current row of the result set.
method %Next(ByRef sc As %Library.Status = $$$OK) as %Library.Integer [ Language = objectscript ]
Advance the result set cursor to the next row. Returns 0 if the cursor is at the end of the result set.
private method %OnNew(SQLCode As %Integer = 0, Message As %String(MAXLEN=256)="", RowCount As %Integer = 0) as %Status [ Language = objectscript ]
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 %RawString = "", %args...) as %Library.IResultSet [ Language = objectscript ]
Inherited description: %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.

  • queryId
      This can be 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.

      queryId can also be a <className><colon><queryName> or <className><colon><methodName>. If it is a <queryName> then the result set returned is an instance of %Library.ResultSet that is bound to that query. If it is the name of a method Then that method is called, passing %args... to the method, and the first result set found in the context object (%sqlcontext) is returned.

  • %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.

  • %args...
      Argument values to be passed to the query/method/class %Execute()() method. Zero, one or more argument values can be passed.
  • method %SendODBC() as %Library.Integer [ Language = objectscript ]
    Fetch and send a series of rows for the ODBC/JDBC server. For internal use only.

    Inherited Members

    Inherited Properties (Including Private)

    Inherited Methods (Including Private)