I'm trying to build a project scheduler / planner.
This is the E/R for a project:
(class +Proj +Macropisobj)
(rel id (+Key +Number))
(rel nm (+Ref +String))
(rel sDate (+Ref +String))
(rel eDate (+Ref +String))
(dm getCurrent> (Sdate Edate)
(filter '((P) (or
(< Sdate (; P sDate) Edate)
(< Sdate (; P eDate) Edate)
(< Sdate (; P sDate) (; P eDate) Edate) ) )
(collect 'id This) ) )
I haven't decided on whether or not to use +Date yet so the above dates are
on the "Y-m-d" format currently.
I need to find all projects which are active during a certain time period,
for instance between 2016-11-01 and 2016-12-31.
Logically that means finding all projects which have either a start date or
an end date in the period OR all projects with a start date before the
range that also have an end date after the range.
I can fairly trivially do a collect and then a filter on the results of the
collect as shown above.
But how would the above problem be solved with Pilog and select if we have
more than "a couple of hundred objects" in the database?