Skip to content

Commit

Permalink
apply changes for RangeGreaterThan and RangeLowerThan
Browse files Browse the repository at this point in the history
  • Loading branch information
cfaur09 committed Feb 5, 2024
1 parent aa2d1fa commit e4fb17d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/elastic/src/entities/range.greater.than.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { QueryRange } from "./query.range";
import { RangeDataType } from "./range.data.type.enum";

export class RangeGreaterThan extends QueryRange {
constructor(value: number) {
super('gt', value);
constructor(value: string | number, withType: RangeDataType = RangeDataType.number) {
super('gt', withType === RangeDataType.string ? value.toString() : value, withType);
}
}
5 changes: 3 additions & 2 deletions packages/elastic/src/entities/range.lower.than.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { QueryRange } from "./query.range";
import { RangeDataType } from "./range.data.type.enum";

export class RangeLowerThan extends QueryRange {
constructor(value: number) {
super('lt', value);
constructor(value: string | number, withType: RangeDataType = RangeDataType.number) {
super('lt', withType === RangeDataType.string ? value.toString() : value, withType);
}
}

0 comments on commit e4fb17d

Please sign in to comment.