Help us shape the future of Go! Take the 2026 Go Developer Survey

query

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(sql string, args []string) string

Bind replaces placeholders in a SQL query with the provided args. It supports PostgreSQL-style ($1, $2, ...) and MySQL-style (?) placeholders.

func Normalize

func Normalize(sql string) string

Normalize replaces literal values in a SQL query with placeholders, so that structurally identical queries can be grouped together.

String literals ('...') are replaced with '?', standalone numeric literals are replaced with ?, and $N parameters are kept as-is. Consecutive whitespace is collapsed to a single space.

Types

This section is empty.

Jump to

Keyboard shortcuts

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