Expand description
Laboratory IDs attached to an agent target, backed by the postgres
laboratory_attachments table.
A row attaches one laboratory_id to EITHER an
agent_instance_hierarchy (AIH) OR a tag — never both (a CHECK
constraint enforces exclusivity). A given laboratory is attached at
most once per target (a partial unique index per target column).
laboratory_id is an opaque external identifier.
Enums§
- Target
- Which target column a row is keyed on.
Functions§
- attach
- Attach
laboratory_idtotarget. Returnstrueif a row was inserted,falseif it was already attached. Caller holds the agent lock, so the select-then-insert is race-free. - detach
- Detach
laboratory_idfromtarget. Returnstrueif a row was deleted,falseif there was nothing to delete. Caller holds the agent lock. - list
- All laboratory ids attached to
target, oldest-attached first.