Skip to main content

%SQL.DICT.Util

SQL Dictionary utilities

Method Inventory

Methods

classmethod FindClass(pSchemaName As %Library.String(MAXLEN=500), pTableName As %Library.String(MAXLEN=500)) as %Library.String
FindClass Given a Basetable name, return the Class Name pSchemaName - Schema name pTablename - Table name
classmethod ParseDelimitedString(pLex As %Library.String(MAXLEN=""), pDelimiter As %Library.String(MAXLEN=1)=".", ByRef pToken As %Library.String)
ParseDelimitedString is a utility to parse an input string into tokens delimited by the specified delimiter character. The result is returned in the pToken array where pToken is the number of tokens found and each token is located in pToken(position). This method will throw and exception if any errors are detected.
classmethod QualifyObjectName(pObjectType As %Library.String = "table", pObjectName As %String(MAXLEN=256)="", pSchemaPath As %Library.List = $Get(%sqlSchemaPath), pImportList As %Library.List = $Get(%defschema)) as %Library.List
QualifyObjectName - this method will determine the schema qualifier for an SQL object. Object types are "table" and "routine". The qualified object name is returned. This method will throw an exception if errors are detected. Parameters: pObjectType table or routine pObjectName the unqualified object name pSchemaPath the SQL Schema Search path pImportList the %defschema list containing the default schema and all of the schemas associated with packages in the import list Returns a $List containing the object schema and object name.
classmethod SetImportList(pPackageList As %Library.String(MAXLEN="")="")
SetImportList will process a comma-delimited list of package names. The result is a %defschema public variable that is recognized by the macro-preprocessor and the SQL query processor. The schema defined for each package is placed into %defschema. If the pPackageList argument is empty then the resulting %defschema will contain only the default schema. This method will throw and exception if any errors are detected.
classmethod SetSchemaPath(pSchemaPath As %Library.String = "", pCurrentClass As %Library.String(MAXLEN=500)="")
SetSchemaPath will process a schema path that contains a comma-delimited list of schema names. The result is a %sqlSchemaPath public variable that is recognized by the macro-preprocessor and the SQL query processor. Schema names of CURRENT_SCHEMA, CURRENT_USER, DEFAULT_SCHEMA and CURRENT_PATH are recognized and converted to the actual schema. This method will throw and exception if any errors are detected.
FeedbackOpens in a new tab