You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In many cases, UUIDs are handled directly in their serialized text representation. Examples may include:
Logging - Instead of serializing a uuid every time, storing the serialized version and logging this is much more efficient.
Databases - Storing UUIDs in text form in certain databases, such as DynamoDB, is often advantageous.
Serialization - Consider JSON/XML/YAML serialization & deserialization. Parsing the text UUIDs can be avoided and is often not necessary.
I deal with serialized UUIDs so frequently that I've created type-safe Serialized_uuid & Serialized_uuid_view types for my own usage. I'm wondering if the boost.uuid library authors would be interested in accepting these types - I'd be happy to contribute the code.
The idea with these types is that they can be constructed from serialized UUID text, guaranteeing the format of the string to uphold the invariants.
With this, they store/reference the UUID text, providing efficient access to the validated UUID text for subsequent logging or whatever. They essentially increase type-safety around the serialized format of UUIDs.
The text was updated successfully, but these errors were encountered:
In many cases, UUIDs are handled directly in their serialized text representation. Examples may include:
uuid
every time, storing the serialized version and logging this is much more efficient.I deal with serialized UUIDs so frequently that I've created type-safe
Serialized_uuid
&Serialized_uuid_view
types for my own usage. I'm wondering if the boost.uuid library authors would be interested in accepting these types - I'd be happy to contribute the code.The idea with these types is that they can be constructed from serialized UUID text, guaranteeing the format of the string to uphold the invariants.
With this, they store/reference the UUID text, providing efficient access to the validated UUID text for subsequent logging or whatever. They essentially increase type-safety around the serialized format of UUIDs.
The text was updated successfully, but these errors were encountered: