I need to store intervals represented with their start/end times with precision to 10 minutes.
What are the best practices to do so with CosmosDB? I need to be able have queries like
get me all intervals that start at given dateget me all intervals that end at given date
ISO representation doesn’t seem to be too suitable for that. I am not sure unix timestamps are either.
Other options include storing day, month, year, hour, minute as ints.
Is there some best practice for it?
PS. General case could involve that i want queries like:
give me intervals that start at the same date as interval with id={id}
or
give me all intervals that are longer than interval with id={id}
datetype makes it either impossible or inefficient to do any kind of date-related calculations on cosmos db side. of course we can do UDFs for conversions but having it as some supported type looks more flexible.all intervals that are longer than interval with id={intervalid}then i run into complications. Its just string representation limitation which can be mitigated by using naturally supported types. at least that's my 2 cents.