Home > Class Reference > %SYS namespace > %UnitTest.Utility

%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 (Including Private)

Methods (Including Private)

classmethod FindClass(class As %String = "") as %Boolean [ Language = objectscript ]
Returns True if class exists
classmethod Occurs(str As %String = "", del As %String = "", start As %Integer = 0) as %Integer [ Language = objectscript ]
Count the number of occurences of a delimiter in a string
classmethod convertSQL(sql As %String = "") as %String [ Language = objectscript ]
replace 'arguments' in supplied sql with ?
classmethod countCachedQuery(query As %String = "") as %Integer [ Language = objectscript ]
Count the number of occurences of a query in the cached query table
classmethod countGlobalRefs() as %BigInt [ Language = objectscript ]
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 [ Language = objectscript ]
Compare data values from sql output
classmethod describe(table As %String, ByRef colcount As %Integer = 0, ByRef sc As %Status) as %String [ Language = objectscript, 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 [ Language = objectscript ]
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 [ Language = objectscript ]
classmethod diffPlan(rplan As %Stream, splan As %Stream) as %Stream [ Language = objectscript ]
classmethod genPlan(sql As %String) as %Stream [ Language = objectscript ]
classmethod getColumn(ByRef str As %Stream) as %String [ Language = objectscript ]
Get the column information
classmethod getData(ByRef str As %Stream, ByRef data As %Stream, type As %Integer = 0, ByRef plan As %Stream = "") [ Language = objectscript ]
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 [ Language = objectscript ]
Return section from
classmethod getSqlCode(str As %String = "") as %String [ Language = objectscript ]
Return the SQLCODE value from a supplied string
classmethod getSqlExec(ByRef str As %FileCharacterStream, ByRef line As %Integer) as %String [ Language = objectscript ]
Return a sql execution from file
classmethod ltrim(str As %String = "") as %String [ Language = objectscript ]
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) [ Language = objectscript ]
Rewind line(s) from current line for stream returns the lines between lastline and rewindline
classmethod rtrim(str As %String = "") as %String [ Language = objectscript ]
Trim trailing white spaces from str
classmethod stripChar(str As %String = "", asciicode As %Integer = 0) as %String [ Language = objectscript ]
Strip out occurrences of a ASCII character from a supplied string
classmethod trim(str As %String = "") as %String [ Language = objectscript ]
Trim leading and trailing white spaces from str
classmethod typeNameByType(type As %String) as %String [ Language = objectscript ]
Return name of data type for given data type value

Inherited Members

Inherited Methods (Including Private)

FeedbackOpens in a new window