Problem/Motivation
We want to be able to use the opIncludes operator with potentially NULL start or end values.
NULL start or end values are possible when you use the Optional End Date module.
Steps to reproduce
The BETWEEN operator used in the query will exclude all results with NULL start or end values.
Proposed resolution
Replace BETWEEN SQL operator with this simple WHERE condition:
select *
from m_table
where ( data >= :start_date
or :start_date is null
)
and ( date <= :end_date
or :end_date is null
)
The second operator duplicates the first but generates an index-friendly SQL query by avoiding the DATE_FORMAT function for better performance.
User interface changes
The two new operators added.
Issue fork views_daterange_filters-3562035
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mably commentedAdded a second version of the "Includes Unbound" operator allowing usage of the date range fields indexes.
Comment #4
mably commentedComment #5
mably commentedComment #7
mably commented