adminforth 1.3.54-next.3 → 1.3.54-next.5

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.
@@ -268,14 +268,12 @@ class ClickhouseConnector extends AdminForthBaseConnector implements IAdminForth
268
268
 
269
269
 
270
270
  const countQ = await this.client.query({
271
- query: `SELECT COUNT(*) FROM ${tableName} ${where}`,
271
+ query: `SELECT COUNT(*) as count FROM ${tableName} ${where}`,
272
272
  format: 'JSONEachRow',
273
273
  query_params: d,
274
274
  });
275
275
  const countResp = await countQ.json()
276
- process.env.HEAVY_DEBUG && console.log('🪲🪲⏲️ Clickhouse COUNT', `SELECT COUNT(*) FROM ${tableName} ${where}`, d, 'resp', countResp);
277
-
278
- return countResp[0]['COUNT()'];
276
+ return +countResp[0]['count'];
279
277
  }
280
278
 
281
279
  async getMinMaxForColumnsWithOriginalTypes({ resource, columns }: { resource: AdminForthResource, columns: AdminForthResourceColumn[] }): Promise<{ [key: string]: { min: any, max: any } }> {
@@ -247,13 +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
- process.env.HEAVY_DEBUG && console.log('🪲🪲⏲️ Clickhouse COUNT', `SELECT COUNT(*) FROM ${tableName} ${where}`, d, 'resp', countResp);
256
- return countResp[0]['COUNT()'];
255
+ return +countResp[0]['count'];
257
256
  });
258
257
  }
259
258
  getMinMaxForColumnsWithOriginalTypes(_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "1.3.54-next.3",
3
+ "version": "1.3.54-next.5",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",