query

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 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 added in v0.2.2

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