Skip to content

Harmonize profile helper methods to have similar signatures #14016

@dmathieu

Description

@dmathieu

We have several helper methods in profiles that allow manipulating dictionary indices:

We should harmonize those methods so they all have similar signatures.
Right now, some are named PutX, and others are named SetX. I suggest we name everything SetX.

Right now, some methods take a record and update it in place, while others return the ID of the data that was retrieved or added to the dictionary.
Updating in place is not the most efficient way to do this, especially for merging profiles, as for slices of records (for example, attributes in a stack), we need to create a new slice and use the helper method on it.
If we return an ID, we can update the ID directly within the existing slice.
So I suggest we switch every helper method to use the signature of returning an ID (as SetString does).

Metadata

Metadata

Assignees

Labels

area:pdatapdata module related issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions