adminforth 1.3.54-next.2 → 1.3.54-next.4

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.
@@ -265,14 +265,15 @@ class ClickhouseConnector extends AdminForthBaseConnector implements IAdminForth
265
265
  const tableName = resource.table;
266
266
  const where = this.whereClause(resource, filters);
267
267
  const d = this.whereParams(filters);
268
+
268
269
 
269
270
  const countQ = await this.client.query({
270
- query: `SELECT COUNT(*) FROM ${tableName} ${where}`,
271
+ query: `SELECT COUNT(*) as count FROM ${tableName} ${where}`,
271
272
  format: 'JSONEachRow',
272
273
  query_params: d,
273
274
  });
274
275
  const countResp = await countQ.json()
275
- return countResp[0]['COUNT()'];
276
+ return countResp[0]['count'];
276
277
  }
277
278
 
278
279
  async getMinMaxForColumnsWithOriginalTypes({ resource, columns }: { resource: AdminForthResource, columns: AdminForthResourceColumn[] }): Promise<{ [key: string]: { min: any, max: any } }> {
@@ -247,12 +247,12 @@ class ClickhouseConnector extends AdminForthBaseConnector {
247
247
  const where = this.whereClause(resource, filters);
248
248
  const d = this.whereParams(filters);
249
249
  const countQ = yield this.client.query({
250
- query: `SELECT COUNT(*) FROM ${tableName} ${where}`,
250
+ query: `SELECT COUNT(*) as count FROM ${tableName} ${where}`,
251
251
  format: 'JSONEachRow',
252
252
  query_params: d,
253
253
  });
254
254
  const countResp = yield countQ.json();
255
- return countResp[0]['COUNT()'];
255
+ return countResp[0]['count'];
256
256
  });
257
257
  }
258
258
  getMinMaxForColumnsWithOriginalTypes(_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "1.3.54-next.2",
3
+ "version": "1.3.54-next.4",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",