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

statement

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package statement compiles PostgreSQL search SQL without executing it. Callers supply validated table identities and retain all transaction, readiness, migration, and result-ownership decisions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Put

func Put(documents, indexes string, schema search.Schema, docs []search.Document) query.RawStatement

Put compiles one bounded upsert chunk, retaining the definition-row share lock that prevents a concurrent index drop from racing document publication.

func Reindex

func Reindex(documents string, schema search.Schema) query.RawStatement

Reindex compiles the tsvector refresh for one logical index. Table names are quoted independently of values; the caller owns the surrounding transaction.

func Search(
	documents, name string,
	spec search.Spec,
	limit, offset int,
) (query.RawStatement, query.RawStatement, error)

Search compiles the ordered window and capped count from the same protected filter expression. It binds values in their original order and preserves the first invalid comparison before either statement can reach the database.

Types

This section is empty.

Jump to

Keyboard shortcuts

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