This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?

%UnitTest.Utility

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

Method Inventory

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 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

Inherited Members

Inherited Methods

Feedback