3 ms·
Does anyone use ULIDs [1] instead of UUIDs for stuff like this? I like that they're sortable. [1] https://github.com/alizain/ulid https://github.com/alizain/u
by gjem97 9y ago
Does anyone use ULIDs [1] instead of UUIDs for stuff like this? I like that they're sortable.
[1] https://github.com/alizain/ulid https://github.com/alizain/ulid
- joekrill 9y agoWhat use is sorting a randomly generated value? I guess you're technically sorting on creation time?
- WorldMaker 9y agoI've been using ULIDs heavily in my projects lately. The lexicographic sort was something I was particularly looking for, because CouchDB _id indexes are lexicographic, meaning I more often than not can just use the main index and the order it returns the items. Given these projects are "offline first" apps, a stable sort and low probability of collisions were key needs.