@opengis/fastify-table 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Changelog.md
CHANGED
package/package.json
CHANGED
|
@@ -42,7 +42,7 @@ async function getFilterSQL({
|
|
|
42
42
|
filter,
|
|
43
43
|
tableSQL,
|
|
44
44
|
fields,
|
|
45
|
-
filterList: body?.filter_list || filterList,
|
|
45
|
+
filterList: filterList || (body?.filter_list || []).concat(body.filterInline || []).concat(body.filterCustom || []).concat(body.filterState || []).concat(body.filterList || []),
|
|
46
46
|
pg,
|
|
47
47
|
config,
|
|
48
48
|
});
|
|
@@ -19,7 +19,7 @@ function getQuery({
|
|
|
19
19
|
|
|
20
20
|
const filterQueryArray = config.v3?.filter
|
|
21
21
|
? decodeURI(filterStr?.replace(/(^,)|(,$)/g, '')).replace(/'/g, '').split(/[;|]/)
|
|
22
|
-
: decodeURI(filterStr?.replace(/(^,)|(,$)/g, '')?.replace(/,null/g, '')).replace(/'/g, '').split(/[
|
|
22
|
+
: decodeURI(filterStr?.replace(/(^,)|(,$)/g, '')?.replace(/,null/g, '')).replace(/'/g, '').split(/[;|]/);
|
|
23
23
|
|
|
24
24
|
const resultList = [];
|
|
25
25
|
|
|
@@ -45,7 +45,7 @@ function getQuery({
|
|
|
45
45
|
const type = pg.pgType?.[dataTypeID];
|
|
46
46
|
|
|
47
47
|
// filter
|
|
48
|
-
const filter = filterList?.find((el) => el.
|
|
48
|
+
const filter = filterList?.find((el) => el.id === name) || { type: 'text' };
|
|
49
49
|
const filterType = filter.type?.toLowerCase();
|
|
50
50
|
// format query
|
|
51
51
|
|