airframe icon indicating copy to clipboard operation
airframe copied to clipboard

ULID creation method that just took the timestamp would be useful

Open TimPigden opened this issue 3 years ago • 1 comments

I have time-based data for which I wish to generate ULIDs - I need to generate a key and want default sorting/storage in the right sequence - but the timestamp relates to the timing of the event, not the generation of the ULID - so a variant of the ULID.of() method that did not require me to supply some random stuff would be nice. Currently the .of method requires me to think about randomness whereas newUlID does not

What dire consequences will result from a workaround of ulidDummy = ULID.newULID p = ulidDummy.randomness ULID.of(myTimestampt, p._1, p._2)

?

TimPigden avatar Mar 30 '22 12:03 TimPigden

This makes sense. Let's add a such method

xerial avatar Mar 31 '22 23:03 xerial