Skip to content

Added method to check if the connection to the configured database is ok#176

Merged
likp merged 2 commits intomasterfrom
feature/db-connection-health-check
Aug 18, 2025
Merged

Added method to check if the connection to the configured database is ok#176
likp merged 2 commits intomasterfrom
feature/db-connection-health-check

Conversation

@likp
Copy link
Contributor

@likp likp commented Aug 18, 2025

This could e.g. be used by an health check endpoint in an API to check if the DB connection is valid.

Modified the `IsDbConnectionHealthy` method to take a `string queryText` parameter. The method now executes the provided query instead of a hardcoded SQL query, enhancing flexibility for checking database connection health.
@sonarqubecloud
Copy link

Copy link
Collaborator

@JohannesFinsveen JohannesFinsveen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants