@opengis/fastify-table 1.2.40 → 1.2.41

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "1.2.40",
3
+ "version": "1.2.41",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [
@@ -32,7 +32,7 @@ where $1 in (a.route_id, a.alias, a.table_name) and $2 in (b.user_uid, d.user_ui
32
32
  export default async function getAccess({ table, user = {} }, pg = pgClients.client) {
33
33
  if (!table) return null;
34
34
 
35
- const hookData = await applyHook('getAccess', { table, user });
35
+ const hookData = await applyHook('getAccess', { table, user, pg });
36
36
  if (hookData) return hookData;
37
37
 
38
38
  const { uid, user_type: userType = 'regular' } = user;
@@ -47,7 +47,7 @@ export default async function suggest(req) {
47
47
  original: `with c(id,text) as (select ${column || 'row_number() over()'}, ${column}, count(*) from ${tableName} group by ${column} limit ${limit}) select * from c`,
48
48
  searchQuery: '(lower("text") ~ $1 )',
49
49
  }
50
- : await getSelectMeta({ name: selectName, nocache: query?.nocache });
50
+ : await getSelectMeta({ pg: pg1, name: selectName, nocache: query?.nocache });
51
51
 
52
52
  if (meta?.minLength && query.key && query.key.length < meta?.minLength) {
53
53
  return { message: `min length: ${meta.minLength}` };