@opengis/admin 0.1.90 → 0.1.91
Sign up to get free protection for your applications and to get access to all the features.
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 })) });
|