Out of the box thinking! Excellent!
Oh, make a feature/pull request!
I have a pending req for a between
function that would work to look for a range.
between(val(X),Y,Z)
between(A,val(B),val(C))
I am interested though how a single range type might look. I have always modeled it as start,end. Maybe a fixed double? And then JSON could read it as [start,end]
and a group of ranges would be [[start,end]]
?
Part of our use case for the timeranges is to query intersection of timeranges. Eg: our incoming query has time X->Y and the TEMPORAL node from @seanlaff’s comment has a list of timeranges [(X+1), (Y+2)] so the query intersects the predicate value. So between would only work if there were a type that represented a range on a number line.
We initially used the geo type for this but that is really made for geography and not geometry and made horrific queries to use intersects()
, along with many other problems with that approach.