But will it use a name or age index? Age index bad example but hey. Sqlquery is a class so you can extend/replace it. We came up with a syntax where the sql would generate based on the parameters.  So you could do

SELECT TOP IDNameAgeSSN FROM Sample.Person
WHERE 1=1
--If Name'=""
  And Name %STARTSWITH :Name
--endif 
--if Age'=""
  AND Age >= :Age
--endif

There is a directory somewhere in windows that stores temporary files for studio.

Could be this has old versions of some classes.

I had a similar problem when doing bulk code changes on xml files.

Shut down studio. Delete the dir. 

I can' remember where it is. It's 3am. When I really wake up I will find it.

You should be able to get the trigger to work with object %Save:

Trigger OnUpdate [ Event = UPDATE/DELETE, Time = BEFORE ,Foreach = row/object

Could you pretend to be the compiler and run the generator method? Might be a problem if the method does anything other than generate code.

Class temp.proc
{

ClassMethod showcode(classname, methodname)
{
    n %class,%code,%method,%compiledclass,%compiledmethod,%parameter
    
    s %compiledclass=##class(%Dictionary.CompiledClass).%OpenId(classname)
    s %compiledmethod=##class(%Dictionary.CompiledMethod).%OpenId(classname_"||"_methodname)
    s generatorclassname=%compiledmethod.Origin
    s %class=##class(%Dictionary.ClassDefinition).%OpenId(classname)
    s %method=##class(%Dictionary.MethodDefinition).%OpenId(generatorclassname_"||"_methodname)
        
    s key="" f  { s param=%compiledclass.Parameters.GetNext(.key) q:key=""  s %parameter(param.Name)=param.Default }
    
    s %code=##class(%Stream.MethodGenerator).%New()

    s exec=" d "_methodname_"^"_generatorclassname_".G1(%class,%code,%method,%compiledclass,%compiledmethod,.%parameter)"
    x exec
    
    d %code.Rewind()
    w %code.Read()
}

 

I am not sure if all the variables here are set correctly, or if the generator code always ends up in a G1 or even if this is a good idea, was just thinking.

This is not code I have used before.