Hi,
i'm trying to implement a POST-VALIDATE TRIGGER for the CR table and i need to compare the previous and current values of some attributes.
Example 1: (In this case I know how to do it)
... test.mod ...
OBJECT cr {
TRIGGERS {
POST_VALIDATE zupdate_cr(group) 153 FILTER(EVENT("UPDATE") && group{});
};
};
... test.spl ...
cr::zupdate_cr(...)
{
uuid previous_group, current_group;
previous_group= argv[2];
current_group= argv[3];
.
.
.
}
But if there are more than one attributes changed i don't know how do it.
Example 2:
... test.mod ...
OBJECT cr {
TRIGGERS {
POST_VALIDATE zupdate_cr() 153 FILTER(EVENT("UPDATE") && (group{} || status{}));
};
};
... test.spl ...
cr::zupdate_cr(...)
{
uuid previous_group, current_group;
strion previous_status, current_status
previous_group= ?;
current_group= ?;
previous_status= ?;
current_status= ?;
.
.
.
}
I need to know how to obtain the values of previous_status, current_status, previous_group and current_group.
Can somebody help me?
Thanks.