Class Reference
%UnitTest.Utility
Server:appadmin-00044-deployment-6bf4cbc86d-9f4xc
Instance:IRIS
User:SuperUser
 
-
  [USER] >  [%UnitTest] >  [Utility]
Private  Storage

The methods in this class are used by the SQLRegression class. They are subject to change, and not intended to be called directly.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
22


Summary

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
FindClass Occurs convertSQL countCachedQuery
countGlobalRefs crossVerify describe diffData
diffExpectedByStream diffPlan genPlan getColumn
getData getFromPlan getSqlCode getSqlExec
ltrim rewindLine rtrim stripChar
trim typeNameByType

Subclasses

Methods

• classmethod FindClass(class As %String = "") as %Boolean
Returns True if class exists
• classmethod Occurs(str As %String = "", del As %String = "", start As %Integer = 0) as %Integer
Count the number of occurences of a delimiter in a string
• classmethod convertSQL(sql As %String = "") as %String
replace 'arguments' in supplied sql with ?
• classmethod countCachedQuery(query As %String = "") as %Integer
Count the number of occurences of a query in the cached query table
• classmethod countGlobalRefs() as %BigInt
returns the number of global references for the master process, including number of global references from worker jobs, updated when the master process gets a work unit complete notification
• classmethod crossVerify(ByRef ref As %FileCharacterStream, ByRef src As %FileCharacterStream) as %GlobalCharacterStream
Compare data values from sql output
• classmethod describe(table As %String, ByRef colcount As %Integer = 0, ByRef sc As %Status) as %String [ SQLProc = desc ]
Describe table method returns column names and types of a given table. Parameter colcount returns number of columns in the table
• classmethod diffData(ByRef rdata As %Stream, ByRef sdata As %Stream, type As %Integer = 0) as %Stream
Compare the data row by row and column by column
• classmethod diffExpectedByStream(ByRef sql As %Stream, ByRef exp As %Stream, ignoreVars As %ListOfDataTypes = "") as %Stream
• classmethod diffPlan(rplan As %Stream, splan As %Stream) as %Stream
• classmethod genPlan(sql As %String) as %Stream
• classmethod getColumn(ByRef str As %Stream) as %String
Get the column information
• classmethod getData(ByRef str As %Stream, ByRef data As %Stream, type As %Integer = 0, ByRef plan As %Stream = "")
Get the data information str is stream read, data is stream write, type is result data format (0=dsql,osql,jsql; 1=esql)
• classmethod getFromPlan(plan As %Stream, tag As %String) as %String
Return section from
• classmethod getSqlCode(str As %String = "") as %String
Return the SQLCODE value from a supplied string
• classmethod getSqlExec(ByRef str As %FileCharacterStream, ByRef line As %Integer) as %String
Return a sql execution from file
• classmethod ltrim(str As %String = "") as %String
Trim leading white spaces from str
• classmethod rewindLine(ByRef str As %Stream, beginline As %Integer = 0, lastline As %Integer = 0, rewindline As %Integer = 0, ByRef outstr As %Stream)
Rewind line(s) from current line for stream returns the lines between lastline and rewindline
• classmethod rtrim(str As %String = "") as %String
Trim trailing white spaces from str
• classmethod stripChar(str As %String = "", asciicode As %Integer = 0) as %String
Strip out occurrences of a ASCII character from a supplied string
• classmethod trim(str As %String = "") as %String
Trim leading and trailing white spaces from str
• classmethod typeNameByType(type As %String) as %String
Return name of data type for given data type value


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.