unaccent

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

README

pg/unaccent

The unaccent extension for sqlb. Needs CREATE EXTENSION unaccent.

SQL Helper
unaccent(text) Unaccent
unaccent('dict'::regdictionary, text) WithDictionary

Accent-insensitive equality: sqlb.EqExpr(sqlb.Lower(unaccent.Unaccent(name)), sqlb.Lower(unaccent.Unaccent(sqlb.Param(q)))). Combine with pg/trgm for accent-insensitive fuzzy search.

Documentation

Overview

Package unaccent is the unaccent extension: strip diacritics before comparing or indexing text. Needs CREATE EXTENSION unaccent.

Index

Constants

This section is empty.

Variables

View Source
var Extension = pg.Extension{Name: "unaccent"}

Extension is the unaccent extension this package's constructs need, for pg.CreateExtension(Extension), so a library installs what it uses without spelling its name.

Functions

func Unaccent

func Unaccent(e sqlb.Expr[string]) sqlb.Expr[string]

Unaccent renders unaccent(e). It is STABLE, not IMMUTABLE, so it cannot sit in an expression index directly; wrap it in your own IMMUTABLE SQL function for that.

func WithDictionary

func WithDictionary(dict string, e sqlb.Expr[string]) sqlb.Expr[string]

WithDictionary renders unaccent(dict, e) for a custom rules dictionary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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