@opengis/admin 0.1.90 → 0.1.91
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/package.json
CHANGED
@@ -44,8 +44,8 @@ export default async function tableFilter(req) {
|
|
44
44
|
if (!dataTypeID) return;
|
45
45
|
|
46
46
|
const countArr = pg.pgType?.[dataTypeID]?.includes('[]')
|
47
|
-
? await pg.
|
48
|
-
: await pg.
|
47
|
+
? await pg.queryCache(`select unnest(${name})::text as id,count(*) from ${loadTable.table} where ${loadTable.query || '1=1'} group by unnest(${name})`)
|
48
|
+
: await pg.queryCache(`select ${name}::text as id,count(*) from ${loadTable.table} where ${loadTable.query || '1=1'} group by ${name}`);
|
49
49
|
|
50
50
|
/* if (!countArr.rows?.length) {
|
51
51
|
Object.assign(el, { options: cls.map((item) => ({ count: 0, ...item })) });
|