DocBook|Search
Class Reference
%UnitTest.ODBCSQL
   
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%UnitTest] >  [ODBCSQL]
Private  Storage  

class %UnitTest.ODBCSQL extends %RegisteredObject, %UnitTest.Utility

Extends Utility. Methods to execute sql files against Cache ODBC SQL and return results in a stream.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
4 6


Summary

Methods
%%OIDGet %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 crossVerify describe diffData
diffExpectedByStream diffPlan genPlan getColumn
getData getFromPlan getODBCDSN getODBCGateway
getSqlCode getSqlExec ltrim processLog
processORSToStream rewindLine rtrim runODBCSQL
runODBCSQLStatement stripChar trim typeNameByType

Subclasses
%UnitTest.SQLRegression %UnitTest.TSQL

Parameters

• parameter Password = "SYS";
Specify password for odbc database connection
• parameter Port;
Specify Cache 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

• classmethod getODBCDSN(dsn As %String = "") as %Status
Find or Add ODBC DSN dsn at System level
• classmethod getODBCGateway(ByRef gcn As %String = "", ByRef dsn As %String = "") as %Status
Add or verify Gateway Connection
  1. gcn Gateway Connection Name will be verified or added
  2. 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 and SQL Gateway Connection are created if they don't exist, or used if they do. DSN and Gateway name is " "
• 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.