-
Notifications
You must be signed in to change notification settings - Fork 12
/
ycUtil.r
36 lines (34 loc) · 1.16 KB
/
ycUtil.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Youth cohort utility functions
# \brief Clears a kv-list's contents.
#
# \param kvList
#
uuKvClear(*kvList) {
*kvList."." = ".";
foreach (*key in *kvList) {
*kvList.*key = ".";
}
}
uuYcObjectIsLocked(*objPath, *locked) {
msiGetObjType(*objPath, *objType);
*locked = false;
if (*objType == '-d') {
uuChopPath(*objPath, *collection, *dataName);
foreach (*row in SELECT META_DATA_ATTR_VALUE
WHERE COLL_NAME = '*collection'
AND DATA_NAME = '*dataName'
AND META_DATA_ATTR_NAME = 'to_vault_lock'
) {
*locked = true;
break;
}
} else {
foreach (*row in SELECT META_COLL_ATTR_VALUE
WHERE COLL_NAME = '*objPath'
AND META_COLL_ATTR_NAME = 'to_vault_lock'
) {
*locked = true;
break;
}
}
}