%UnitTest.ODBCSQL
hidden class %UnitTest.ODBCSQL extends %Library.RegisteredObject, %UnitTest.Utility
The methods in this class are used by the SQLRegression class to execute SQL files using an ODBC SQL Gateway connection and return results in a stream. They are subject to change, and not intended to be called directly.Method Inventory
Parameters
parameter Password = SYS;
Specify password for odbc database connection
parameter Port;
Specify Super Server Port for odbc database connection
parameter Url = 127.0.0.1;
Specify url for odbc database connection
parameter Username = _system;
Specify username for odbc database connection
Methods
Find or Add ODBC DSN dsn at System level
Add or verify Gateway Connection
- gcn Gateway Connection Name will be verified or added
- dsn if value passed in we will add it to gcn if missing, but will not verify it at lower level if you need to, call getODBCDSN first to create a dsn at the lower level and pass the name to this function
classmethod processLog(ByRef fnderr As %ListOfDataTypes, ByRef log As %Stream) as %Status
Return any errors found in log in fnderr list
classmethod processORSToStream(clist As %List, rlist As %List, err As %String = "", ByRef output As %Stream, verbose As %Boolean = 0, space As %Boolean = 1) as %Status
Write ResultSet out to Stream
If verbose=1 then also write column information to Stream with ResultSet
space must be 1 for SQLRegression and SQLDataRegression to correctly process tuples in each resultset row.
classmethod runODBCSQL(sqlfilename As %String, ByRef dsn As %String = "", verbose As %Boolean = 0) as %Stream
Connect to ODBC and run SQL from sqlfilename in ANY namespace and return result as %Stream.
ODBC DSN is dynamically created by modifying the built-in "User" DSN
classmethod runODBCSQLStatement(sql As %String = "", ByRef dsn As %String = "", verbose As %Boolean = 0, Username As %String = "", Password As %String = "", ByRef RowCount As %Integer) as %Stream
Connect to ODBC and run SQL statement in ANY namespace and return result as %Stream.
ODBC DSN and SQL Gateway Connection are created if they don't exist, or used if they do.
DSN and Gateway name is " "
Username and Password can be passed as argument or as class parameter
If verbose is 1 the column information is included in the resultset.
Inherited Members
Inherited 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()