Skip to content

Added database connection example to Singleton pattern#3451

Open
MADHURI-HS wants to merge 1 commit intoiluwatar:masterfrom
MADHURI-HS:improve-readme
Open

Added database connection example to Singleton pattern#3451
MADHURI-HS wants to merge 1 commit intoiluwatar:masterfrom
MADHURI-HS:improve-readme

Conversation

@MADHURI-HS
Copy link

Added an additional real-world example for the Singleton pattern.

This improves clarity by including database connection management as a practical use case.

@github-actions
Copy link

github-actions bot commented Mar 24, 2026

PR Summary

Expanded the Singleton pattern documentation by adding a real-world example: database connection management. The README now highlights using a single shared instance to manage database connections and clarifies when the Singleton pattern is appropriate.

Changes

File Summary
singleton/README.md Updated README to include a real-world Singleton use case: database connection management ensuring a single shared instance across the application. Adds a bullet under 'Use the Singleton pattern when'.

autogenerated by presubmit.ai

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

LGTM!

Review Summary

Commits Considered (1)
  • d2a8516: Added database connection example to Singleton pattern
Files Processed (1)
  • singleton/README.md (1 hunk)
Actionable Comments (0)
Skipped Comments (1)
  • singleton/README.md [81-81]

    best_practice: "Clarify DB usage pattern for Singleton example"

@sonarqubecloud
Copy link

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.

1 participant