%ISQL.Transformer
hidden class %ISQL.Transformer extends %Library.RegisteredObject
Transform ISQL source code to COS
Property Inventory
Method Inventory
- %OnClose()
- CacheTypeToISQL()
- CompilerParameters()
- ConvertCompilerParameter()
- ExecuteStringAsISQL()
- GetCacheType()
- GetSynonym()
- GetSysType()
- GetTableFieldType()
- PathToDLL()
- SQLExpression()
- Transform()
Properties
The directory for CacheISQL.DLL.
Defaults to the CacheSys/Bin directory - change it if you want to debug a different version of the DLL.
How we call the DLL
Takes one of the following values :-
1 - use $ZF(-3) ... handy for debugging the DLL because it doesn't stay loaded
2 - use $ZF(-4)/$ZF(-5) ... to cache the DLL handle
3 - use $ZF(-4)/$ZF(-6) ... the default - there's normally no reason to change it
Initialised to 3
The cached DLLHandle (used only when DLLCallMode=2)
Set to a result code string
Mainly of use to Intersystems support.
Methods
The return value of this method is ignored.
Convert a comma-delimited list of arg:cachetype to @arg:sqltype
Returns the Cache type corresponding to the given ISQL type
Returned string has the format "error!" or "!result"
Empty result part (i.e. "!") means the type was not found
Returns TableOrViewName, or "" if not found
Returns PhysType, or "" if not found
Called by the DLL during compilation
Return the path to the DLL
Convert the given ISQL source code to COS.
* SourceStream is a stream containing the source code
* GenStream is a stream to which the generated code is written
* ProcsStream is a stream to which names of required procedures are written (one per line)
* ErrorsStream is a stream to which any error messages are written
* Settings is a string of settings separated by commas. Each
setting has the format key or key=value
The DELIMIDENT setting enables parsing of double-quoted literals as delimited names
- the default is to parse them as string literals
* ColoringErrors is returned as 1 if there were syntax errors in the source
* SPInfo identifies the stored procedure: $LB(class,method)
* FormalSpec is $LB("formal,formal,..",return)
See the help in the ISQL shell for details of supported settings.
The return code is 1 on success, 0 on failure. See the
DLLResultCode property for information about failure.
CacheISQL.DLL must be in the directory given by the
BinDir property. By default this points to the CacheSys/Bin
directory.
In the example below SourceIn, GenOut and ErrorsOut are all streams.
SourceIn supplies the source code, GenOut receives the generated code
and ErrorsOut receives any error messages.
Set TT=##class(%ISQL.Transformer).%New() Set Ret=TT.Transform(.Source,.Gen,.Errors,"") // "" is a flags string reserved for future use If 'Ret ZT // this indicates a fatal error
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()