forked from brynary/arel
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
233ee77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it not be better to continue to use BETWEEN for a range with an excluded end?
So move this fix to engines/sql/core_extensions/range.rb ?
233ee77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sdsykes: In SQL a BETWEEN clause is inclusive (it matches the start/end values). An exclusive Range does not match the end value. For example try
(1...100).include?(100)
from IRB and you'll see that it returns false, while(1..100).include?(100)
returns true.