6 ms·
Who the heck stores uuids in their string form. Its only useful for transport. For stoage you use bytes.
by stop50 4y ago
Who the heck stores uuids in their string form. Its only useful for transport. For stoage you use bytes.
- postalrat 4y agoAny time I get what looks like a UUID from a service not under my control and I can't guarantee will always be a UUID.
- BeefWellington 4y agoSure but at that point you're talking about external systems anyways, and the same would be true for any identifier they give you. One day that int may change into a raw byte array, string, braille, emoji-encoded[1], you name it. This article is about scenarios where it IS under your control. [1]: https://pypi.org/project/base-emoji/ https://pypi.org/project/base-emoji/
- dspillett 4y agoYou can still store and process it as a large integer, rather than a less efficient string, unless something in your stack is enforcing validation of the version/variant bits. Unless your concern is more that they may not be unique enough due to bad choices in their derivation function, but this will not change no matter what representation you store them in.