SELECT t.*
FROM table t
WHERE t.start <= @probeDate AND
( t.finish =>>= @probeDate OR
t.finish IS NULL )
SELECT t.*
FROM table t
WHERE t.start <= @probeDate AND
( t.finish => @probeDate OR
t.finish IS NULL )
SELECT t.*
FROM table t
WHERE t.start <= @probeDate AND
( t.finish >= @probeDate OR
t.finish IS NULL )
SELECT t.*
FROM table t
WHERE t.start <= probeDate@probeDate AND
( t.finish => probaDate@probeDate OR
t.finish IS NULL )
SELECT t.*
FROM table t
WHERE t.start <= probeDate AND
( t.finish => probaDate OR
t.finish IS NULL )
SELECT t.*
FROM table t
WHERE t.start <= @probeDate AND
( t.finish => @probeDate OR
t.finish IS NULL )
PS.: Don't worry about the internal integrity of NodeList
and Node
(checking for invalid nodes, invalid min and max datetimes, checking overlaps, etc.) — this is just a quick and dirty concept. I'm primarily interested in the search algorithm in NodeList::find()
and consequently NodeList::binarySearch()
.
PS.: Don't worry about the internal integrity of NodeList
and Node
(checking for invalid nodes, invalid min and max datetimes, checking overlaps, etc.) — this is just a quick and dirty concept. I'm primarily interested in the search algorithm in NodeList::find()
and consequently NodeList::binarySearch()
.