Skip to main content

EnsLib.SQL.GatewayResultSet

class EnsLib.SQL.GatewayResultSet extends %Library.RegisteredObject, %Library.AbstractResultSet

This class is a specialized result set used with the SQLGatewayOutboundAdapter Instances are returned as output from the SQLGatewayOutboundAdapter ExecuteQuery() method. The result set is only valid while the SQL.OutboundAdapter's connection is connected

Property Inventory

Method Inventory

Parameters

parameter LOBSUCCESSWITHINFO = 1;
Indicates support for LOB optimization. 1 means we count on GetData() returning 1 (SqlSuccessWithInfo) when there is more data; 0 means we always loop until GetData() returns 100 (SqlNoMoreData).
1 optimizes for speed with single non-LOB fetches if we can count on LOBs being reported properly, 1 always checks in a loop in case a field might have extra data, even though it means twice as many ODBC calls for non-LOB fields. 0 also means support ODBC returning an error instead of SQLCODE 100 when there is no more data.

Properties

property Data [ MultiDimensional , ReadOnly ];
This is a multi-dimensional property that contains the data of the current row
Property methods: DataDisplayToLogical(), DataGet(), DataIsValid(), DataLogicalToDisplay(), DataLogicalToOdbc(), DataNormalize(), DataSet()
property MaxString as %Integer [ ReadOnly ];
This holds the maximum string length for the current job (gotten from $$$MaxLocalLength)
Property methods: MaxStringDisplayToLogical(), MaxStringGet(), MaxStringIsValid(), MaxStringLogicalToDisplay(), MaxStringNormalize()

Methods

method %CloseCursor() as %Status
alias for new result set interface
method %Get(pColName As %String) as %String
alias for Get in new result set interface
method %GetData(pColumn As %Integer) as %String
alias for GetData in new result set interface
method %Next(ByRef pSC As %Status) as %Integer
Inherited description: Advance the result set cursor to the next row. Returns 0 if the cursor is at the end of the result set.
method Close() as %Status
Closes the current result set cursor.
method ColCountGet() as %Integer
method ConvertToListOfDataTypes(Output pList As %ListOfDataTypes, ByRef pMaxRows As %Integer = 250) as %Status
Deprecated - use GetSnapshot()
method Get(pColName As %String) as %String
Returns the value of the column with the name 'pColName' in the current row of the result set Note: if the data exceeds the maximum string length then the return value will be the first 50 characters plus "..." and you should call GetStream() to get the full value.
method GetColumnCount() as %Integer
Returns the number of columns in the result set
method GetColumnExtInfo(n As %Integer) as %String
Returns the name of column n in the result set.
method GetColumnID(pColName As %String) as %Integer
method GetColumnIsBinary(pColumn As %Integer = 0) as %Boolean
Returns whether column 'pColumn' contains binary data.
method GetColumnIsLOB(pColumn As %Integer = 0) as %Boolean
Returns whether column 'pColumn' is a LOB (Stream) column.
method GetColumnName(pColumn As %Integer = 0) as %String
Returns the name of column pColumn in the result set.
method GetColumnSQLType(pColumn As %Integer = 0) as %Integer
Returns the SQLtype integer of column 'pColumn' in the result set.
method GetColumnSize(pColumn As %Integer = 0)
Returns the size (precision) of column 'pColumn' in the result set.
method GetColumnType(pColumn As %Integer = 0) as %String
Returns the type name of column 'pColumn' in the result set.
method GetData(pColumn As %Integer) as %String
Returns the value of column pColumn in the current row of the result set. Note: if the data exceeds the maximum string length then the return value will be the first 50 characters plus "..." and you should call GetStream() to get the full value.

method GetDataByName(pColName As %String) as %String
Deprecated - use Get() method
method GetDataStream(pColumn As %Integer, ByRef pStream As %Stream.Object = $$$NULLOREF) as %Stream.Object
Returns as a Stream the full value of column pColumn in the current row of the result set. If you pass a stream object in pStream, the data will be appended to that stream; otherwise the data will be returned in a new %Stream.GlobalCharacter stream object.

Note that if this method creates a Stream object for you, the Stream data is already on disk and you are responsible for calling stream.%Delete(stream.%Oid()) to delete the persistent storage for the new stream object

method GetODBCInfo(ByRef colinfo As %List, ByRef parminfo As %List) as %Status
method GetRowList() as %String
method GetSnapshot(ByRef pSnap As EnsLib.SQL.Snapshot, pFetchAll As %Boolean = 0) as %Status
Populate an EnsLib.SQL.Snapshot object. If you pass one in, it will be populated using the values in its FirstRow and MaxRowsToGet properties. Otherwise, GetSnapshot will construct a new one and use its default values for FirstRow and MaxRowsToGet.
method GetStream(pColName As %String, ByRef pStream As %Stream.Object = $$$NULLOREF) as %Stream.Object
Returns as a Stream the full value of the column with the name 'pColName' in the current row of the result set. If you pass a stream object in pStream, the data will be appended to that stream; otherwise the data will be returned in a new %Stream.GlobalCharacter stream object. Note that if this method creates a Stream object for you, the Stream data is already on disk and you are responsible for calling stream.%Delete(stream.%Oid()) to delete the persistent storage for the new stream object
method HasDataStream(pColumn As %Integer) as %Boolean
Returns true if the given field in the current row contains stream data. In this case the complete value for the field can only be retrieved using the GetStream() or GetDataStream() method. Otherwise the field contains simple string data that can be retrieved completely using the Get() or GetData() method.
method HasStream(pColName As %String) as %Boolean
Returns true if the named column in the current row contains stream data. In this case the complete value for the field can only be retrieved using the GetStream() or GetDataStream() method. Otherwise the field contains simple string data that can be retrieved completely using the Get() or GetData() method.
method Initialize(pQueryStatement As %String, pAdapter As EnsLib.SQL.OutboundAdapter, pHS As %String, pFinal As %Boolean, pMoreIndex As %Integer) as %Status
To be called by EnsLib.SQL.OutboundAdapter to set up the initial state
Advance the result set cursor to the next row and cache the row data. Returns 0 if the cursor is at the end of the result set.
method QueryIsValid() as %Integer
Returns true (1) if the ClassName and QueryName properties of this %ResultSet object refer to a valid class query. Otherwise it returns false (0).
method SkipNext(ByRef pSC As %Status) as %Boolean
Advance the result set cursor to the next row. Returns 0 if the cursor is at the end of the result set

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab