sqlite

package
v0.0.0-...-4e6119a Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package sqlite implements the storage.Store interface using SQLite via github.com/mattn/go-sqlite3.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLiteStore

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

SQLiteStore implements storage.Store backed by a SQLite database.

func Open

func Open(dsn string, encryptionKey string) (*SQLiteStore, error)

Open creates a new SQLiteStore at the given DSN (file path or ":memory:"). If encryptionKey is non-empty, the database is encrypted using SQLCipher. It initializes the database schema on first use.

func (*SQLiteStore) AddAuditEntry

func (s *SQLiteStore) AddAuditEntry(ctx context.Context, id string, entry schema.AuditEntry) error

func (*SQLiteStore) AddRelation

func (s *SQLiteStore) AddRelation(ctx context.Context, sourceID string, rel schema.Relation) error

func (*SQLiteStore) Begin

Begin starts a new database transaction.

func (*SQLiteStore) Close

func (s *SQLiteStore) Close() error

Close closes the underlying database connection.

func (*SQLiteStore) Create

func (s *SQLiteStore) Create(ctx context.Context, rec *schema.MemoryRecord) error

func (*SQLiteStore) Delete

func (s *SQLiteStore) Delete(ctx context.Context, id string) error

func (*SQLiteStore) Get

func (*SQLiteStore) GetRelations

func (s *SQLiteStore) GetRelations(ctx context.Context, id string) ([]schema.Relation, error)

func (*SQLiteStore) List

func (*SQLiteStore) ListByType

func (s *SQLiteStore) ListByType(ctx context.Context, memType schema.MemoryType) ([]*schema.MemoryRecord, error)

func (*SQLiteStore) Update

func (s *SQLiteStore) Update(ctx context.Context, rec *schema.MemoryRecord) error

func (*SQLiteStore) UpdateSalience

func (s *SQLiteStore) UpdateSalience(ctx context.Context, id string, salience float64) error

Jump to

Keyboard shortcuts

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