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

sqliteindex

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package sqliteindex indexes note metadata in SQLite.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is a SQLite note index.

func New

func New(ctx context.Context, path string) (*Store, error)

New opens an index and applies its migrations.

func (*Store) Close

func (store *Store) Close() error

Close closes the SQLite database.

func (*Store) Delete

func (store *Store) Delete(ctx context.Context, id uuid.UUID) error

Delete removes a note and its attributes and tags from the index.

func (*Store) JournalExists

func (store *Store) JournalExists(ctx context.Context, date domain.Date) (bool, error)

JournalExists reports whether a journal is indexed for date.

func (*Store) JournalID

func (store *Store) JournalID(ctx context.Context, date domain.Date) (uuid.UUID, bool, error)

JournalID finds the indexed journal for a date.

func (*Store) List

func (store *Store) List(ctx context.Context) ([]ports.IndexRecord, error)

List returns indexed notes with attributes and tags, newest update first.

func (*Store) ReplaceAll

func (store *Store) ReplaceAll(ctx context.Context, records []ports.IndexRecord) error

ReplaceAll atomically replaces every indexed note with records.

func (*Store) Upsert

func (store *Store) Upsert(ctx context.Context, note domain.Note) error

Upsert adds or replaces a note and its tags atomically.

func (*Store) UpsertRecord

func (store *Store) UpsertRecord(ctx context.Context, record ports.IndexRecord) error

UpsertRecord adds or replaces indexed metadata for an edited source document.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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