Open mareek opened 3 weeks ago
One thing that would be very nice is, besides support for the time component, to also be able to determine the random component. This is pretty important for database queries.
Suppose I have a UUIDv7 Id field. It's indexed/partitioned/sharded based on the Id field. I want to query the database for data for the last day, without creating additional indexes. Then being able to construct a query like this:
SELECT * FROM Id >= lowerBoundry
would be nice, where the random component for the lower boundary is initialised to zero. To support these types of queries initializing the random component to the maximum or minimum value needs to be supported in the API.
Things to keep in mind :
See .NET 9's Guid.CreateVersion7(DateTimeOffset) and #14 for inspiration