sqlcommenter

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL