IRISLIB database
Util Class Reference

Utilities for Sql Migration. More...

Inheritance diagram for Util:
Collaboration diagram for Util:

Public Member Functions

 AddOwnerMap (_.Library.String SourceOwner, _.Library.String DestOwner)
 Add 1 Mapping of Source schema to destination schema.
 
 ClearOwnerMap ()
 Deletes all the content of the OwnerMap.
 
 CopyOneView (_.Library.String VOwner, _.Library.String VName, _.Library.String hstmt)
 Copy one view Definition from the remote DB to InterSystems IRIS.
 
 CopyOneViewJ (_.Library.String VOwner, _.Library.String VName)
 Copy one view Definition from the remote DB to InterSystems IRIS.
 
_.Library.String DatatypeName (_.Library.String DType, _.Library.Integer Precision, _.Library.Integer Length, _.Library.Integer Scale, _.Library.String DtName, _, _.Library.String msg)
 Returns Name of InterSystems IRIS Datatype for given column

 
_.Library.Status DropForeignKeys (_.Library.String TbOwner, _.Library.String TbName, _.Library.Boolean verbose)
 Given a table, drop any foreign keys constraint defined on that table.
 
_.Library.Status DropTable (_.Library.String TbOwner, _.Library.String TbName, _.Library.Boolean verbose)
 Drops one table on destination. More...
 
_.Library.Status DropView (_.Library.String VOwner, _.Library.String VName, _.Library.Boolean verbose)
 Drops one View on destination.
 
_.Library.Status ExecSql (_.Library.String stsql)
 Executes an Sql Statement in the current namespace as localUser.
 
_.Library.String FindIdentity (_.Library.String TbOwner, _.Library.String TbName, _.Library.String hstmt)
 Returns a $list of Columns Names which are AutoIncrement/Identity in source Database.
 
_.Library.String FindIdentityJ (_.Library.String TbOwner, _.Library.String TbName)
 Returns a $list of Columns Names which are AutoIncrement/Identity in source Database.
 
_.Library.String FindViewDeps (_.Library.String VOwner, _.Library.String VName, _.Library.String hstmt)
 Get List of Dependencies for a View.
 
_.Library.String IFXFindNotNull (_.Library.String TbOwner, _.Library.String TbName, _.Library.String hstmt)
 Informix:Returns a $list of Column Names which are Not NULL is source DB.
 
_.Library.String OraDefault (_.Library.String TbOwner, _.Library.String TbName, _.Library.String ColName)
 Oracle: returns Column Default from ALL_TAB_COLUMNS.
 
_.Library.Integer isaView (_.Library.String TbOwner, _.Library.String TbName, _.Library.String hstmt)
 Finds out if the given Table is a Table (0) or a View (1)
 
_.Library.Integer isaViewJ (_.Library.String TbOwner, _.Library.String TbName)
 Finds out if the given Table is a Table (0) or a View (1)
 
- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 

Static Public Member Functions

 ClearErrors ()
 Clears the Migration Error Log for this instance.
 
 ClearStatusMsg ()
 Clear the Migration status message list.
 
_.Library.String GetCGateHandle ()
 Initializes before using the SqlGateWay Calls. More...
 
_.Library.String GetLastErrorMsg ()
 Returns last Error of Migration process.
 
_.Library.String GetLastStatusMsg ()
 Returns current Status of Migration process.
 
 LogError (_.Library.String FuncName, _.Library.Integer errno, _.Library.String errdesc, _.Library.String TbOwner, _.Library.String TbName, _.Library.String sql)
 Logs an Error into the Migration Error Log.
 
 LogStatusMsg (_.Library.String msg)
 Logs Status message.
 
 ShowAllErrors ()
 Displays all Errors for current Migration process on current device.
 

Public Attributes

 Debug
 Debugging ? More...
 
 DebugOutFile
 OutputFile for Sql Statements executed (to Debug) More...
 
 DeferIndices
 If true, generate indices after importing data. More...
 
 DeleteExistingData
 Delete Exiting Data from table before importing. More...
 
 GTWUnicode
 Does the Gateway support Wide Calls? More...
 
 MaxErrors
 maximum number of Data Import Errors to report per table when Copying Data 0=All More...
 
 NoCheck
 If true, import will insert with NOCHECK. More...
 
 NoJournal
 If true, import will run without journaling enabled. More...
 
 NoTrigger
 If true, import will insert with NOTRIGGER. More...
 
 PreservePKName
 Preserve Primary Key Constraint Name when importing table. More...
 

Static Public Attributes

 RTNPREFIX = None
 Utilities for Sql Migration. More...
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Private Attributes

 __DBMSName
 SQL_DBMSName of source DSN. More...
 
 __DBMSVersion
 SQL_DBMSVer of source DSN. More...
 
 __DriverName
 SQL_DriverName ODBC Driver used to connect: used to differentiate between Oracle Native and Microsoft Driver... More...
 
 __DtArray
 Array Of Datatypes on source Database. More...
 
 __OwnerMap
 Map to translate Source DSN schemas (owner) to InterSystems IRIS Schemas. More...
 
 __SQLGateway
 Property for calling the GateWay with $zf(-5,..) More...
 
 __dsn
 DSN we are connected to. More...
 
 __hdbc
 hdbc to source DSN More...
 
 __isJDBC
 1 if this is a JDBC connection, 0 if ODBC More...
 

Detailed Description

Utilities for Sql Migration.

Member Function Documentation

◆ DropTable()

_.Library.Status DropTable ( _.Library.String  TbOwner,
_.Library.String  TbName,
_.Library.Boolean  verbose 
)

Drops one table on destination.

Drops Foreign keys pointing to that table.

◆ GetCGateHandle()

_.Library.String GetCGateHandle ( )
static

Initializes before using the SqlGateWay Calls.

Tries to load odbcgateway and return a handle for $ZF(-5)

Member Data Documentation

◆ RTNPREFIX

RTNPREFIX = None
static

Utilities for Sql Migration.

Prefix for Generated Routines

◆ __DBMSName

__DBMSName
private

SQL_DBMSName of source DSN.

 

◆ __DBMSVersion

__DBMSVersion
private

SQL_DBMSVer of source DSN.

 

◆ Debug

Debug

Debugging ?

 

◆ DebugOutFile

DebugOutFile

OutputFile for Sql Statements executed (to Debug)

 

◆ DeferIndices

DeferIndices

If true, generate indices after importing data.

 

◆ DeleteExistingData

DeleteExistingData

Delete Exiting Data from table before importing.

 

◆ __DriverName

__DriverName
private

SQL_DriverName ODBC Driver used to connect: used to differentiate between Oracle Native and Microsoft Driver...

 

◆ __DtArray

__DtArray
private

Array Of Datatypes on source Database.

 

◆ GTWUnicode

GTWUnicode

Does the Gateway support Wide Calls?

 

◆ MaxErrors

MaxErrors

maximum number of Data Import Errors to report per table when Copying Data 0=All

 

◆ NoCheck

NoCheck

If true, import will insert with NOCHECK.

 

◆ NoJournal

NoJournal

If true, import will run without journaling enabled.

 

◆ NoTrigger

NoTrigger

If true, import will insert with NOTRIGGER.

 

◆ __OwnerMap

__OwnerMap
private

Map to translate Source DSN schemas (owner) to InterSystems IRIS Schemas.

 

◆ PreservePKName

PreservePKName

Preserve Primary Key Constraint Name when importing table.

 

◆ __SQLGateway

__SQLGateway
private

Property for calling the GateWay with $zf(-5,..)

 

◆ __dsn

__dsn
private

DSN we are connected to.

 

◆ __hdbc

__hdbc
private

hdbc to source DSN

 

◆ __isJDBC

__isJDBC
private

1 if this is a JDBC connection, 0 if ODBC