tamaki.mes.backup.compare.getKey
Description
Builds a unique string key for an entity by joining its key-field values with a : separator. None
values are treated as empty strings. This key is used to match entities between the old and new lists
during comparison. For example, key fields ["name", "locationPath"] with values "Widget" and
"Factory A" produce "Widget:Factory A".
Raises a TypeError if keyValues is not a list, or a ValueError if it is empty.
Syntax
tamaki.mes.backup.compare.getKey(keyValues)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
keyValues | List | False | The entity's key-field values, in the order defined for the entity type (see getKeyFields). |
Returns
A String uniquely identifying the entity from its key-field values.
Code Examples
key = tamaki.mes.backup.compare.getKey(["Widget", "Factory A"])
# "Widget:Factory A"