@opengis/fastify-table 2.0.51 → 2.0.52

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.
@@ -1,2 +1,2 @@
1
- export default function getSelect(name: any, pg?: any): Promise<any>;
1
+ export default function getSelect(name: any, pg?: any, nocache?: boolean): Promise<any>;
2
2
  //# sourceMappingURL=getSelect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSelect.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/table/funcs/getSelect.ts"],"names":[],"mappings":"AAYA,wBAA8B,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAmB,gBA6BvE"}
1
+ {"version":3,"file":"getSelect.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/table/funcs/getSelect.ts"],"names":[],"mappings":"AAYA,wBAA8B,SAAS,CACrC,IAAI,EAAE,GAAG,EACT,EAAE,MAAmB,EACrB,OAAO,UAAQ,gBAgChB"}
@@ -7,9 +7,10 @@ const sqls = {
7
7
  json: `select json_agg(json_build_object('id', code, 'text', name, 'icon', icon, 'color', color)) as data from admin.user_cls where parent=$1
8
8
  union all select json_agg(json_build_object('id', code, 'text', name, 'icon', icon, 'color', color)) as data from admin.cls where parent=$1`,
9
9
  };
10
- export default async function getSelect(name, pg = pgClients.client) {
11
- if (loadCls[name] && !config.local)
10
+ export default async function getSelect(name, pg = pgClients.client, nocache = false) {
11
+ if (loadCls[name] && !config.local && !nocache) {
12
12
  return loadCls[name];
13
+ }
13
14
  const clsDataGIT = await getTemplate(["cls", "select"], name);
14
15
  const { type } = pg.pk?.["admin.user_cls"]
15
16
  ? await pg
@@ -8,7 +8,7 @@ const selectMeta = {};
8
8
  export default async function getSelectMeta({ name, pg = pgClients.client, nocache, parent, }) {
9
9
  if (selectMeta[name] && !nocache)
10
10
  return selectMeta[name];
11
- const cls = await getSelect(name, pg);
11
+ const cls = await getSelect(name, pg, nocache);
12
12
  const db = typeof cls?.db === "string" ? { database: cls.db } : cls?.db;
13
13
  const pg1 = cls?.db ? getPG(db) : pg;
14
14
  if (!pg1?.pk)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "2.0.51",
3
+ "version": "2.0.52",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [