Hello @Pietro Di Leo
AFAIK, There is no direct execution of the IndexKeyOpen and other generated methods in python. We can write a wrapper method to run those methods.
Class pylearn.NewClass2 Extends %Persistent
{
Property Code As %String(MAXLEN = 50) [ Required ];
Index CodeIdx On Code [ Unique ];
ClassMethod RunCode() [ Language = python ]
{
import iris
iris_obj = iris.cls(__name__).GeObjByIdx("CodeIdx","A212")
print(iris_obj.Code)
}
ClassMethod GeObjByIdx(IndexName, ID)
{
Return $ClassMethod(,IndexName_"Open",ID)
}
}- Log in to post comments