sqlite

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MemoryTypePreference  = typescore.MemoryTypePreference
	MemoryTypeKnowledge   = typescore.MemoryTypeKnowledge
	MemoryTypeIndex       = typescore.MemoryTypeIndex
	PriorityLow           = typescore.PriorityLow
	PriorityMedium        = typescore.PriorityMedium
	PriorityHigh          = typescore.PriorityHigh
	PageKindPreference    = typescore.PageKindPreference
	PageKindKnowledge     = typescore.PageKindKnowledge
	PageKindLongTerm      = typescore.PageKindLongTerm
	PageKindKnowledgeBase = typescore.PageKindKnowledgeBase
)

Variables

View Source
var EstimateTokens = utils.EstimateTokens
View Source
var NewID = utils.NewID
View Source
var PageKeywordScore = utils.PageKeywordScore

Functions

func IngestGetCursor

func IngestGetCursor(ctx context.Context, db *sql.DB, sessionID string) (int64, error)

func IngestIncStat

func IngestIncStat(ctx context.Context, db *sql.DB, sessionID, ruleName string) error

func IngestSetCursor

func IngestSetCursor(ctx context.Context, db *sql.DB, sessionID string, lastMessageID int64) error

Types

type IndexNode

type IndexNode = typescore.IndexNode

type IndexSearchResult

type IndexSearchResult = typescore.IndexSearchResult

type IndexTree

type IndexTree = typescore.IndexTree

type KnowledgeEntry

type KnowledgeEntry = typescore.KnowledgeEntry

type MemoryItem

type MemoryItem = typescore.MemoryItem

type PageIndexDoc

type PageIndexDoc = typescore.PageIndexDoc

type PageIndexHit

type PageIndexHit = typescore.PageIndexHit

type PageIndexKind

type PageIndexKind = typescore.PageIndexKind

type PageIndexSearchOptions

type PageIndexSearchOptions = typescore.PageIndexSearchOptions

type Preference

type Preference = typescore.Preference

type Priority

type Priority = typescore.Priority

type SQLiteIndexStore

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

func NewSQLiteIndexStore

func NewSQLiteIndexStore(store *SQLiteStore) *SQLiteIndexStore

func (*SQLiteIndexStore) AddNode

func (s *SQLiteIndexStore) AddNode(ctx context.Context, userID, sourceID string, node *IndexNode, parentID string) error

func (*SQLiteIndexStore) CreateIndex

func (s *SQLiteIndexStore) CreateIndex(ctx context.Context, userID, sourceID, title string, nodes []*IndexNode) (*IndexTree, error)

func (*SQLiteIndexStore) DeleteIndex

func (s *SQLiteIndexStore) DeleteIndex(ctx context.Context, userID, sourceID string) error

func (*SQLiteIndexStore) GetAllIndexes

func (s *SQLiteIndexStore) GetAllIndexes(ctx context.Context, userID string) ([]*IndexTree, error)

func (*SQLiteIndexStore) GetIndex

func (s *SQLiteIndexStore) GetIndex(ctx context.Context, userID, sourceID string) (*IndexTree, error)

func (*SQLiteIndexStore) RemoveNode

func (s *SQLiteIndexStore) RemoveNode(ctx context.Context, userID, sourceID, nodeID string) error

func (*SQLiteIndexStore) SearchIndex

func (s *SQLiteIndexStore) SearchIndex(ctx context.Context, userID, query string, limit int) (*IndexSearchResult, error)

func (*SQLiteIndexStore) UpdateIndex

func (s *SQLiteIndexStore) UpdateIndex(ctx context.Context, tree *IndexTree) error

func (*SQLiteIndexStore) UpdateNode

func (s *SQLiteIndexStore) UpdateNode(ctx context.Context, userID, sourceID string, node *IndexNode) error

type SQLiteKnowledgeStore

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

func NewSQLiteKnowledgeStore

func NewSQLiteKnowledgeStore(store *SQLiteStore) *SQLiteKnowledgeStore

func (*SQLiteKnowledgeStore) Add

func (*SQLiteKnowledgeStore) Clear

func (s *SQLiteKnowledgeStore) Clear(ctx context.Context, userID string) error

func (*SQLiteKnowledgeStore) Delete

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

func (*SQLiteKnowledgeStore) Get

func (*SQLiteKnowledgeStore) GetByCategory

func (s *SQLiteKnowledgeStore) GetByCategory(ctx context.Context, userID, category string) ([]KnowledgeEntry, error)

func (*SQLiteKnowledgeStore) GetByTags

func (s *SQLiteKnowledgeStore) GetByTags(ctx context.Context, userID string, tags []string) ([]KnowledgeEntry, error)

func (*SQLiteKnowledgeStore) GetStats

func (s *SQLiteKnowledgeStore) GetStats(ctx context.Context, userID string) (int, error)

func (*SQLiteKnowledgeStore) Search

func (s *SQLiteKnowledgeStore) Search(ctx context.Context, userID string, opts *SearchOptions) (*SearchResult, error)

func (*SQLiteKnowledgeStore) Update

type SQLitePageIndexStore

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

func NewSQLitePageIndexStore

func NewSQLitePageIndexStore(store *SQLiteStore) *SQLitePageIndexStore

func (*SQLitePageIndexStore) CountByUser

func (s *SQLitePageIndexStore) CountByUser(ctx context.Context, userID string) (int, error)

func (*SQLitePageIndexStore) Delete

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

func (*SQLitePageIndexStore) DeleteByKinds

func (s *SQLitePageIndexStore) DeleteByKinds(ctx context.Context, userID string, kinds []PageIndexKind) error

func (*SQLitePageIndexStore) DeleteByUser

func (s *SQLitePageIndexStore) DeleteByUser(ctx context.Context, userID string) error

func (*SQLitePageIndexStore) Search

func (s *SQLitePageIndexStore) Search(ctx context.Context, userID, query string, opts *PageIndexSearchOptions) ([]PageIndexHit, error)

func (*SQLitePageIndexStore) Upsert

type SQLitePreferenceStore

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

func NewSQLitePreferenceStore

func NewSQLitePreferenceStore(store *SQLiteStore) *SQLitePreferenceStore

func (*SQLitePreferenceStore) Clear

func (s *SQLitePreferenceStore) Clear(ctx context.Context, userID string) error

func (*SQLitePreferenceStore) Delete

func (s *SQLitePreferenceStore) Delete(ctx context.Context, userID, category, key string) error

func (*SQLitePreferenceStore) Get

func (s *SQLitePreferenceStore) Get(ctx context.Context, userID, category, key string) (*Preference, error)

func (*SQLitePreferenceStore) GetAllAsMap

func (s *SQLitePreferenceStore) GetAllAsMap(ctx context.Context, userID string) (map[string]string, error)

func (*SQLitePreferenceStore) GetByCategory

func (s *SQLitePreferenceStore) GetByCategory(ctx context.Context, userID, category string) ([]Preference, error)

func (*SQLitePreferenceStore) GetByUser

func (s *SQLitePreferenceStore) GetByUser(ctx context.Context, userID string) ([]Preference, error)

func (*SQLitePreferenceStore) Search

func (s *SQLitePreferenceStore) Search(ctx context.Context, userID string, opts *SearchOptions) (*SearchResult, error)

func (*SQLitePreferenceStore) Set

type SQLiteStore

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

func NewSQLiteStore

func NewSQLiteStore(dbPath string) (*SQLiteStore, error)

func NewSQLiteStoreFromDB

func NewSQLiteStoreFromDB(db *sql.DB) (*SQLiteStore, error)

func (*SQLiteStore) Close

func (s *SQLiteStore) Close() error

func (*SQLiteStore) DB

func (s *SQLiteStore) DB() *sql.DB

type SearchOptions

type SearchOptions = typescore.SearchOptions

type SearchResult

type SearchResult = typescore.SearchResult

Jump to

Keyboard shortcuts

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