postgres

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package postgres provides a PostgreSQL+pgvector Provider implementation via Ent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(config core.ProviderConfig, embedder core.Embedder) (core.Provider, error)

NewProvider creates a new PostgreSQL Provider.

Types

type Provider

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

Provider wraps Ent client for PostgreSQL+pgvector.

func (*Provider) Add

func (p *Provider) Add(ctx context.Context, req *core.AddRequest) (*core.Memory, error)

Add adds a new memory.

func (*Provider) Close

func (p *Provider) Close() error

Close closes the provider.

func (*Provider) Delete

func (p *Provider) Delete(ctx context.Context, req *core.DeleteRequest) error

Delete deletes a memory by ID.

func (*Provider) Get

func (p *Provider) Get(ctx context.Context, req *core.GetRequest) (*core.Memory, error)

Get retrieves a memory by ID.

func (*Provider) List

func (p *Provider) List(ctx context.Context, req *core.ListRequest) (*core.ListResponse, error)

List lists memories with optional filters.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

func (*Provider) Recall

Recall retrieves relevant memories for a given query.

func (*Provider) Search

Search performs semantic search on memories using pgvector.

func (*Provider) Update

func (p *Provider) Update(ctx context.Context, req *core.UpdateRequest) (*core.Memory, error)

Update updates an existing memory.

Jump to

Keyboard shortcuts

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