Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileLikeMatch ¶
func CompileLikeMatch(c Compiler, col string, match database.StringMatch, value string, ignoreCase bool)
CompileLikeMatch writes a LIKE comparison of col against the match pattern for value. Ignore-case folds both sides with the database's LOWER: a Go-folded needle can disagree with LOWER(col) on non-ASCII (ASCII-only SQLite LOWER, C-locale postgres) and miss rows. A single fold function means a needle equal to the stored text always matches; characters LOWER cannot fold stay case-sensitive.
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 ¶
EscapeLikePattern escapes %, _, and \ in a LIKE/ILIKE pattern literal.
Types ¶
Click to show internal directories.
Click to hide internal directories.