%Library.ScrollableResultSet
class %Library.ScrollableResultSet extends %Library.ResultSet
This provides a scrollable resultset object that can also be saved and loaded It works by running the entire query when the first item of data is requested and storing the results in a global. Then you can move around the results by setting the CurrRow and you may also call Previous() as well as the standard Next(). In addition you may save this resultset and then load it potentially in a different process at a later date and continue reading from it, for example:Set results=##class(%ScrollableResultSet).%New("Classname:QueryName") Do results.Execute() Do results.Next() Write results.Data("fieldname") Do results.%Save() Set id=results.%Id() Kill results Set results=##class(%ScrollableResultSet).%OpenId(id) Do results.Next() Write results.Data("fieldname")
There is also a Count() to find the total number of entries in this resultset. This will not work if running with a query against a remote linked table which returns stream data for a column because the remote linked table returns the stream as an oref and this class does not support persisting this oref.
Property Inventory
Method Inventory
Properties
Methods
Inherited Members
Inherited Properties
- %Message
- %Metadata
- %PrivateTables
- %ROWCOUNT
- %ROWID
- %ResultColumnCount
- %SQLCODE
- ClassName
- Data
- QueryName
- RuntimeMode
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %CloseCursor()
- %ConstructClone()
- %CreateSnapshot()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %Display()
- %DisplayFormatted()
- %Execute()
- %Extends()
- %Get()
- %GetData()
- %GetMetadata()
- %GetParameter()
- %IsA()
- %IsModified()
- %MetadataGet()
- %New()
- %Next()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %Prepare()
- %PrepareMetaData()
- %Print()
- %RemoveFromSaveSet()
- %ResultColumnCountGet()
- %SendDelimitedRows()
- %SendODBC()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- ClassNameSet()
- Close()
- ContainsId()
- Execute()
- Get()
- GetColumnCount()
- GetColumnExtInfo()
- GetColumnHeader()
- GetColumnName()
- GetColumnType()
- GetData()
- GetDataByName()
- GetExtent()
- GetODBCInfo()
- GetParamCount()
- GetParamName()
- GetStatementType()
- Prepare()
- QueryIsValid()
- RunQuery()
- RuntimeModeGet()
- RuntimeModeSet()
- SetIdInfo()
- Test()