Skip to content

Commit

Permalink
Fix Range._incLower default
Browse files Browse the repository at this point in the history
It should include the lower bound if `_lower` is not `null` or
`undefined`
  • Loading branch information
scotttrinh committed Oct 26, 2023
1 parent 551ed4b commit c0c7210
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion integration-tests/lts/primitives.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe("primitives", () => {
);
assert.equal(
e.std.range(upperRange).toEdgeQL(),
`std::range(<std::int64>{}, 8, inc_lower := true, inc_upper := false)`
`std::range(<std::int64>{}, 8, inc_lower := false, inc_upper := false)`
);
assert.equal(
e.std.range(dateRange).toEdgeQL(),
Expand Down
2 changes: 1 addition & 1 deletion packages/driver/src/datatypes/range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class Range<
constructor(
private readonly _lower: T | null,
private readonly _upper: T | null,
private readonly _incLower: boolean = true,
private readonly _incLower: boolean = _lower != null,
private readonly _incUpper: boolean = false
) {}

Expand Down

0 comments on commit c0c7210

Please sign in to comment.