大家好,
我想知道是否有可能获取自身的值来运行查询。
我想创建一些查询以在%Persistent类中找到一个值,但是每个查询都使用不同的值。
Class Kurro.MyClass Extends %Persistent
{
/// Key of process
Property KeyProcess As %String(MAXLEN = "");
/// Specialist
Property CodeSpecialist As %String;
/// Provider
Property CodeProvider As %String;
/// Center
Property CodeCenter As %String;
/// Date
Property Date As %TimeStamp;
/// IdList
Property IdList As %String;
/// IdProcess
Property IdProcess As %String;
/// Duration
Property Duration As %String;
Query GetInfo(pObject AS Kurro.MyClass) As %SQLQuery(CONTAINID = 1, ROWSPEC = "IdList:%String,IdProcess:%String,Duration:%String")
{
SELECT IdList, IdProcess, Duration
FROM Kurro.MyClass
WHERE KeyProcess = :pObject.KeyProcess
AND CodeSpecialist = :pObject.CodeSpecialist
AND CodeProvider = :pObject.CodeProvider
AND CodeCenter = :pObject.CodeCenter
AND Date = :pObject.Date
}
}.png)