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

sqlite

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package sqlite provides a SQLite-backed Reliquary candidate index.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Table          string
	CandidateLimit int
}

Config controls schema ownership and bounded candidate retrieval.

type Index

type Index struct {
	// contains filtered or unexported fields
}

Index uses caller-owned SQLite connectivity. New performs no database I/O.

func New

func New(db *sql.DB, cfg Config) (*Index, error)

func (*Index) DeleteDocument

func (i *Index) DeleteDocument(ctx context.Context, documentID string) error

func (*Index) Migrate

func (i *Index) Migrate(ctx context.Context) error

Migrate creates only the retrieval-owned schema and is safe to repeat.

func (*Index) ReplaceDocuments added in v0.9.0

func (i *Index) ReplaceDocuments(ctx context.Context, replacements []indexcontract.DocumentReplacement) error

ReplaceDocuments atomically replaces complete document revisions in both the base and FTS tables. Empty result sets delete their document.

func (*Index) Reset

func (i *Index) Reset(ctx context.Context) error

Reset destructively removes all indexed results and FTS entries.

func (*Index) Search

func (i *Index) Search(ctx context.Context, query indexcontract.IndexQuery) ([]*retrieval.Result, error)

func (*Index) Upsert

func (i *Index) Upsert(ctx context.Context, items []*retrieval.Result) error

Jump to

Keyboard shortcuts

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