Skip to content

feat: introduce Commenter interface - #633

Open
boekkooi-impossiblecloud wants to merge 1 commit into
XSAM:mainfrom
boekkooi-impossiblecloud:boekkooi/sqlcommenter
Open

boekkooi-impossiblecloud wants to merge 1 commit into
XSAM:mainfrom
boekkooi-impossiblecloud:boekkooi/sqlcommenter

Conversation

@boekkooi-impossiblecloud

Copy link
Copy Markdown
Contributor

Good day!

This PR introduces the Commenter interface which allows users to use their own custom SQL commenter.
This can be useful when different comments are preferred for SQL statements.

Thanks for having a look and please let me know what you think.
Have a great weekend.

@XSAM

XSAM commented Aug 12, 2026

Copy link
Copy Markdown
Owner

@boekkooi-impossiblecloud Hey, sorry for the late response.

Could you provide a use case where users want to use a different comment style?

@boekkooi-impossiblecloud

Copy link
Copy Markdown
Contributor Author

Hey @XSAM

No worries, I'm already thankful you took the time to review this PR 😄.

In my case I needed a way to add specific comments to the end of all prepare queries which contains specific environment information (e.g. we have a shared set of repositories that are used by multiple workers and we needed to trace which worker called which prepared queries) but we also need to keep the tracing info for query calls.

As the use case is a bit more custom I think the interface makes sense but if you have a better Idea I'm game 😄

Thanks again and have a great day

@XSAM XSAM added this to the v0.45.0 milestone Sep 5, 2026
This allows users of the library to use their own custom commenter.
This can be useful when different comments are prefered for Queries and Prepared statements.
@codecov

codecov Bot commented Nov 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.0%. Comparing base (dd0a106) to head (e25866e).

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #633     +/-   ##
=======================================
+ Coverage   89.8%   90.0%   +0.2%     
=======================================
  Files         16      16             
  Lines        599     613     +14     
=======================================
+ Hits         538     552     +14     
  Misses        61      61             

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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