From dc32733399a8cd1e902b675e1a273ba31eb88a85 Mon Sep 17 00:00:00 2001 From: Svend Domdey Date: Wed, 31 Mar 2021 09:38:22 +0200 Subject: [PATCH] fix: TypeORM Health Check for SAP HANA Change the SQL for the connection health check to 'SELECT now() from dummy' closes https://github.com/nestjs/terminus/issues/1138 --- lib/health-indicator/database/typeorm.health.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/health-indicator/database/typeorm.health.ts b/lib/health-indicator/database/typeorm.health.ts index 1a54548ca..5b04d344d 100644 --- a/lib/health-indicator/database/typeorm.health.ts +++ b/lib/health-indicator/database/typeorm.health.ts @@ -103,6 +103,9 @@ export class TypeOrmHealthIndicator extends HealthIndicator { case 'oracle': check = connection.query('SELECT 1 FROM DUAL'); break; + case 'sap': + check = connection.query('SELECT now() FROM dummy'); + break; default: check = connection.query('SELECT 1'); break;