Documentation
¶
Overview ¶
Package scoring implements the SQLite scoring store for Cortex.
It provides importance scoring persistence operations including score retrieval, updates, access tracking, and batch operations. The store implements the scoring.Repository interface.
Index ¶
- type Store
- func (s *Store) GetAllScores(ctx context.Context) ([]*domain.ImportanceScore, error)
- func (s *Store) GetIncomingEdgeCount(ctx context.Context, obsID int64) (int, error)
- func (s *Store) GetObservation(ctx context.Context, obsID int64) (*domain.Observation, error)
- func (s *Store) GetScore(ctx context.Context, obsID int64) (*domain.ImportanceScore, error)
- func (s *Store) GetTop(ctx context.Context, project string, limit int) ([]*domain.ImportanceScore, error)
- func (s *Store) GetTopByScore(ctx context.Context, project string, limit int) ([]*domain.ImportanceScore, error)
- func (s *Store) RecordAccess(ctx context.Context, obsID int64) error
- func (s *Store) SetScore(ctx context.Context, obsID int64, score float64) error
- func (s *Store) UpdateScore(ctx context.Context, obsID int64, increment float64) error
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 implements the SQLite scoring store.
func (*Store) GetAllScores ¶
GetAllScores retrieves all scores for batch operations like decay.
func (*Store) GetIncomingEdgeCount ¶
GetIncomingEdgeCount returns the number of edges pointing to this observation.
func (*Store) GetObservation ¶
GetObservation retrieves observation data needed for score calculation.
func (*Store) GetTop ¶
func (s *Store) GetTop(ctx context.Context, project string, limit int) ([]*domain.ImportanceScore, error)
GetTop retrieves the most important observations for a project.
func (*Store) GetTopByScore ¶
func (s *Store) GetTopByScore(ctx context.Context, project string, limit int) ([]*domain.ImportanceScore, error)
GetTopByScore retrieves the top-N highest scored observations for a project.
func (*Store) RecordAccess ¶
RecordAccess increments the access count and updates last_accessed timestamp.