UpdateAttributeReferences updates the attribute references for a given key. It associates a specific attribute type with the key. If the key is empty, it returns an error.
(key string, typ AttributeTypeStatement)
| 145 | // It associates a specific attribute type with the key. |
| 146 | // If the key is empty, it returns an error. |
| 147 | func (refs *References) UpdateAttributeReferences(key string, typ AttributeTypeStatement) error { |
| 148 | if len(key) == 0 { |
| 149 | return fmt.Errorf("key cannot be empty") |
| 150 | } |
| 151 | refs.attributeReferences[key] = typ // Set the attribute type for the key. |
| 152 | refs.references[key] = ATTRIBUTE // Mark this key as an attribute reference. |
| 153 | return nil |
| 154 | } |
| 155 | |
| 156 | // RemoveRelationReferences removes the relationship references associated with a given key. |
| 157 | // If the key is empty, it returns an error. |