Let's give end users a break and forgive them when they mix
up the order of a date range. BETWEEN SYMMETRIC allows users
to enter a date range in any order rather than strictly
enforcing "oldest date first" and returning an empty result
set.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Rogan Hamby <rogan.hamby@gmail.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
$sql .= '('. $self->SUPER::toSQL ." IS NOT NULL AND ". $self->SUPER::toSQL ." <> '')";
} elsif (lc($op) eq 'between') {
- $sql .= " BETWEEN ". join(" AND ", map { $_->toSQL } @$val);
+ $sql .= " BETWEEN SYMMETRIC ". join(" AND ", map { $_->toSQL } @$val);
} elsif (lc($op) eq 'not between') {
- $sql .= " NOT BETWEEN ". join(" AND ", map { $_->toSQL } @$val);
+ $sql .= " NOT BETWEEN SYMMETRIC ". join(" AND ", map { $_->toSQL } @$val);
} elsif (lc($op) eq 'like') {
$val = $$val[0] if (ref($val) eq 'ARRAY');