adminforth 1.3.54-next.3 → 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.
|
@@ -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
|
-
|
|
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
|
-
|
|
256
|
-
return countResp[0]['COUNT()'];
|
|
255
|
+
return countResp[0]['count'];
|
|
257
256
|
});
|
|
258
257
|
}
|
|
259
258
|
getMinMaxForColumnsWithOriginalTypes(_a) {
|