Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrependComment ¶ added in v1.5.0
func PrependComment(ctx context.Context, statement string, dbSystemName string, sourceOverride *bool) string
PrependComment prepends a SQLCommenter-format comment to the given SQL statement. It gathers attributes from the context (trace, server, client, tool metadata) and the provided dbSystemName, then prepends them as key='value' pairs sorted alphabetically.
sourceOverride is the per-source `sqlCommenter` setting from tools.yaml. When non-nil it takes priority over the global sql-commenter flag; when nil the global flag (from context) is used.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.