pgvector

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaVersion = uint(2)

SchemaVersion is the newest pgvector migration understood by this binary.

Variables

This section is empty.

Functions

func MigrateUp

func MigrateUp(logger *slog.Logger, cfg config.PGVectorConfig) error

MigrateUp upgrades the configured optional pgvector database. It is kept separate from the primary PostgreSQL migration stream because the two databases can have different hosts, credentials, and lifecycles.

func MigrationsFS

func MigrationsFS() (fs.FS, error)

MigrationsFS returns the independently versioned pgvector migration set.

Types

type Store

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

Store is the shared typed connection to the optional pgvector database. Schema migration and vector type registration happen once when it opens.

func Open

func Open(ctx context.Context, logger *slog.Logger, cfg config.PGVectorConfig) (*Store, error)

func (*Store) Begin

func (s *Store) Begin(ctx context.Context) (pgx.Tx, error)

func (*Store) Close

func (s *Store) Close()

func (*Store) Queries

func (s *Store) Queries() *pgvectorsqlc.Queries

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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