Fixing build after recent type updates.
This commit is contained in:
parent
42b7992430
commit
828d78f2af
|
@ -117,7 +117,8 @@ describe("Captures of real examples", () => {
|
|||
let query = new Sql(SqlClient.POSTGRES, limit)._query(queryJson)
|
||||
const filters = queryJson.filters
|
||||
const notEqualsValue = Object.values(filters?.notEqual!)[0]
|
||||
const rangeValue = Object.values(filters?.range!)[0]
|
||||
const rangeValue: { high?: string | number; low?: string | number } =
|
||||
Object.values(filters?.range!)[0]
|
||||
const equalValue = Object.values(filters?.equal!)[0]
|
||||
|
||||
expect(query).toEqual({
|
||||
|
|
|
@ -218,14 +218,16 @@ export const buildLuceneQuery = (filter: SearchFilter[]) => {
|
|||
high: type === "number" ? maxint : "9999-00-00T00:00:00.000Z",
|
||||
}
|
||||
}
|
||||
if ((operator as any) === "rangeLow" && value != null && value !== "") {
|
||||
query.range[field].low = value
|
||||
} else if (
|
||||
(operator as any) === "rangeHigh" &&
|
||||
value != null &&
|
||||
value !== ""
|
||||
) {
|
||||
query.range[field].high = value
|
||||
if (operator === "rangeLow" && value != null && value !== "") {
|
||||
query.range[field] = {
|
||||
...query.range[field],
|
||||
low: value,
|
||||
}
|
||||
} else if (operator === "rangeHigh" && value != null && value !== "") {
|
||||
query.range[field] = {
|
||||
...query.range[field],
|
||||
high: value,
|
||||
}
|
||||
}
|
||||
} else if (query[queryOperator] && operator !== "onEmptyFilter") {
|
||||
if (type === "boolean") {
|
||||
|
|
Loading…
Reference in New Issue