Replace Filter class with expression structure
This is in order to be able to support UPPER() and LOWER() functions in queries which are needed for case-insensitive search.
This commit is contained in:
1 parent
7194fcab44
commit
c2d13e8364
25 files changed
+716
-578
No files matched your search
@@ -4,12 +4,19 @@ import m from "mithril";
|
||||
import * as taskQueue from "../task-queue";
|
||||
import * as store from "../store";
|
||||
import * as notifications from "../notifications";
|
||||
import * as filterParser from "../../common/filter-parser";
|
||||
import * as funcCache from "../../common/func-cache";
|
||||
import * as expression from "../../common/expression";
|
||||
|
||||
const parseParameter = funcCache.getter(p => {
|
||||
p = expression.parse(p);
|
||||
if (Array.isArray(p) && p[0] === "PARAM") p = p[1];
|
||||
return p;
|
||||
});
|
||||
|
||||
const component = {
|
||||
oninit: vnode => {
|
||||
vnode.state.parameters = Object.values(vnode.attrs.parameters).map(
|
||||
parameter => filterParser.parseParameter(parameter)
|
||||
parameter => parseParameter(parameter)
|
||||
);
|
||||
},
|
||||
view: vnode => {
|
||||
|
||||
Reference in new issue
Block a user