Question
· Nov 28, 2019

Getting Parameters cleanly from Property Definition

HI,

I have made a query with class definitions and all their properties and put them in a view.

All is good besides Parameters is showing junk characters. Is there a way to do it cleanly besides getting into the code??

 

SELECT 
CC.ID As CompiledClass, 
CC.SqlSchemaName,
CC.SqlTableName,
CP.Name As PropertyName, 
CP.SqlFieldName, 
CP.Type,
PD.Parameters

FROM %Dictionary.CompiledProperty CP
JOIN %Dictionary.CompiledClass CC
ON CP.Parent = CC.ID

JOIN %Dictionary.PropertyDefinition PD
ON PD.ID = CP.ID1

Discussion (11)1
Log in or sign up to continue

Call this sqlproc passing class and prop names:

ClassMethod Params(class, prop) As %String [SQLProc]
{
    set result = ""
    set param = ""
    for {
        set param = $$$defparamMemberNext(class,$$$cCLASSproperty,prop,$$$cPROPparameter,param)
        quit:(param ="")
        set value = $$$defMemberArrayGet(class,$$$cCLASSproperty,prop,$$$cPROPparameter,param)
        set result = result _ param _ "=" _ value _ ","
    }
    quit result
}