Skip to content
Snippets Groups Projects
Unverified Commit c12006e2 authored by Ariya Hidayat's avatar Ariya Hidayat Committed by GitHub
Browse files

Expand the supported filters for coordinate type (#16728)

parent fe14063b
No related branches found
No related tags found
No related merge requests found
......@@ -462,6 +462,11 @@ const FILTER_OPERATORS_BY_TYPE_ORDERED = {
{ name: "=", verboseName: t`Is` },
{ name: "!=", verboseName: t`Is not` },
{ name: "inside", verboseName: t`Inside` },
{ name: ">", verboseName: t`Greater than` },
{ name: "<", verboseName: t`Less than` },
{ name: "between", verboseName: t`Between` },
{ name: ">=", verboseName: t`Greater than or equal to` },
{ name: "<=", verboseName: t`Less than or equal to` },
],
[BOOLEAN]: [
{ name: "=", verboseName: t`Is`, multi: false },
......
......@@ -139,6 +139,15 @@ describe("schema_metadata", () => {
});
});
it("should have 'between' filter operator for the coordinate type", () => {
expect(getOperatorByTypeAndName(COORDINATE, "between")).toEqual({
name: "between",
numFields: 2,
validArgumentsFilters: [expect.any(Function), expect.any(Function)],
verboseName: "Between",
});
});
it("should return a metadata object for primary key", () => {
expect(getOperatorByTypeAndName(PRIMARY_KEY, "=")).toEqual({
multi: true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment