Skip to main content

%SQL.ClassQueryResultSet

Property Inventory

Method Inventory

Properties

property %AtEnd as %Integer;
Property methods: %AtEndDisplayToLogical(), %AtEndGet(), %AtEndIsValid(), %AtEndLogicalToDisplay(), %AtEndNormalize(), %AtEndSet()
property %Column as %String [ MultiDimensional ];
Duplicate of Data but subscripted by column number instead of name. This is used only by %SendOdbc to maintain values of columns orphaned by a full buffer.
Property methods: %ColumnDisplayToLogical(), %ColumnGet(), %ColumnIsValid(), %ColumnLogicalToDisplay(), %ColumnLogicalToOdbc(), %ColumnNormalize(), %ColumnSet()
property %Data as %String [ MultiDimensional ];
Used to store the data returned from the resultset by column name. This can be accessed directly for better performance than the Get() and GetDataByName() methods. For example:
  ; This slower code
  
  While result.Next() {
  	Write result.Get("Name"),result.Get("Salary"),!
  }
  
  ; Becomes this faster code
  
  While result.Next() {
  	Write $get(result.Data("Name")),$get(result.Data("Salary")),!
  }
  
Note that because this 'Data' property is multidimensional, if there is no such column name as 'Salary' you will get an UNDEFINED error without the $get around it. If there are two columns with the same name in the result set then the second one will be the one referenced by the 'Data' property. If you need to refer to both of them, use the GetData() and give the position of the column you want.
Property methods: %DataDisplayToLogical(), %DataGet(), %DataIsValid(), %DataLogicalToDisplay(), %DataLogicalToOdbc(), %DataNormalize(), %DataSet()
property %QueryName as %CacheString;
The name of the query to run.
Property methods: %QueryNameGet(), %QueryNameIsValid(), %QueryNameSet()

Methods

method %CloseCursor() as %Status
Closes the current result set cursor.
method %DispatchGetProperty(pProperty As %String(MAXLEN=255))
method %Get(name As %String) as %String
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 throws a error.

method %GetData(colnbr As %Integer = 0) as %Library.String
alias for new result set interface
method %Next(ByRef sc As %Status) as %Integer
Advance the result set cursor to the next row. Returns 0 if the cursor is at the end of the result set.
method %SendODBC() as %Integer
Fetch and send a series of rows for the ODBC/JDBC server. For internal use only.
method Get(name As %String) as %String
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.
Using the Data multidimensional property to access the fields is faster than using this method call.

method GetData(n As %Integer) as %String
Returns the value of column n in the current row of the result set.
method GetDataByName(name As %String) as %String
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.

Note: this method has been superceded by the equivalent Get() method.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab