pattern

package
v0.1.0-alpha.18 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileLikePattern

func CompileLikePattern(c Compiler, match database.StringMatch, value string)

CompileLikePattern writes a dialect-agnostic LIKE pattern expression using WriteArg for the escaped value and WriteString for SQL fragments.

func EscapeLikePattern

func EscapeLikePattern(value string) string

EscapeLikePattern escapes %, _, and \ in a LIKE/ILIKE pattern literal.

Types

type Compiler

type Compiler interface {
	WriteString(string)
	WriteArg(any)
}

Compiler is the minimal surface dialect statement compilers need to provide for shared LIKE-pattern SQL generation.

Jump to

Keyboard shortcuts

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