Documentation
¶
Overview ¶
internal/db/links.go
internal/db/notes.go
internal/db/nulltime.go
internal/db/projects.go
internal/db/sessions.go
internal/db/tags.go
Index ¶
- func CosineSimilarity(a, b []float64) float64
- type DB
- func (d *DB) AddSessionTag(sessionID int64, tag string) error
- func (d *DB) ArchiveProject(id int64) error
- func (d *DB) BumpPreferenceAccess(id int64) error
- func (d *DB) Close() error
- func (d *DB) Conn() *sql.DB
- func (d *DB) DecayPreferences() error
- func (d *DB) DeleteContradictingInferredPreferences() (int64, error)
- func (d *DB) DeleteLowConfidencePreferences(threshold float64) (int64, error)
- func (d *DB) DeletePreference(id int64) error
- func (d *DB) DeleteProject(name string) (int, error)
- func (d *DB) DeleteSupersededPreferences(olderThanDays int) (int64, error)
- func (d *DB) GetConversationDigest(sessionID int64) (string, error)
- func (d *DB) GetDistinctSessionDates() ([]string, error)
- func (d *DB) GetLatestSession(projectID int64) (*Session, error)
- func (d *DB) GetLinkedProjects(projectID int64) ([]Project, error)
- func (d *DB) GetPreference(id int64) (*Preference, error)
- func (d *DB) GetProjectByName(name string) (*Project, error)
- func (d *DB) GetProjectByPath(path string) (*Project, error)
- func (d *DB) GetSessionsInRange(projectID int64, since, until time.Time) ([]Session, error)
- func (d *DB) HasOverlappingSession(projectID int64, start, end time.Time) (bool, error)
- func (d *DB) InsertConversationDigest(sessionID int64, digestJSON string) error
- func (d *DB) InsertNote(n Note) (int64, error)
- func (d *DB) InsertPreference(p Preference) (int64, error)
- func (d *DB) InsertSession(s Session) (int64, error)
- func (d *DB) LinkProjects(projectID, linkedProjectID int64) error
- func (d *DB) ListDirtyProjects() ([]Project, error)
- func (d *DB) ListNotes(projectID int64, limit, offset int) ([]Note, int, error)
- func (d *DB) ListPreferencesByProject(projectID *int64, limit, offset int) ([]Preference, int, error)
- func (d *DB) ListProjects(status string) ([]Project, error)
- func (d *DB) ListSessionTags(sessionID int64) ([]string, error)
- func (d *DB) ListSessions(f SessionFilter) ([]Session, int, error)
- func (d *DB) ListSessionsByTag(tag string) ([]Session, error)
- func (d *DB) PruneNotes(before time.Time) (int64, error)
- func (d *DB) PrunePreferences(before time.Time) (int64, error)
- func (d *DB) PruneSessions(before time.Time) (int64, error)
- func (d *DB) RemoveSessionTag(sessionID int64, tag string) error
- func (d *DB) SearchNotes(query string) ([]Note, error)
- func (d *DB) SearchPreferences(query string) ([]Preference, error)
- func (d *DB) SearchSessions(query string) ([]Session, error)
- func (d *DB) SearchSimilar(queryVec []float64, sourceType string, limit int, minScore float64) ([]EmbeddingResult, error)
- func (d *DB) SessionExists(claudeSessionID string) (bool, error)
- func (d *DB) StoreEmbedding(sourceType string, sourceID int64, content string, vec []float64, model string, ...) error
- func (d *DB) SupersedePreference(oldID, newID int64) error
- func (d *DB) UnlinkProjects(projectID, linkedProjectID int64) error
- func (d *DB) UpdatePreference(id int64, category, content, source string, confidence float64) error
- func (d *DB) UpsertProject(p Project) (int64, error)
- type EmbeddingResult
- type Note
- type NullTime
- type Preference
- type Project
- type Session
- type SessionFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CosineSimilarity ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) ArchiveProject ¶
func (*DB) BumpPreferenceAccess ¶
func (*DB) DecayPreferences ¶
func (*DB) DeleteContradictingInferredPreferences ¶
func (*DB) DeleteLowConfidencePreferences ¶
func (*DB) DeletePreference ¶
func (*DB) DeleteSupersededPreferences ¶
func (*DB) GetConversationDigest ¶
func (*DB) GetDistinctSessionDates ¶
func (*DB) GetPreference ¶
func (d *DB) GetPreference(id int64) (*Preference, error)
func (*DB) GetSessionsInRange ¶
func (*DB) HasOverlappingSession ¶
func (*DB) InsertConversationDigest ¶
func (*DB) InsertPreference ¶
func (d *DB) InsertPreference(p Preference) (int64, error)
func (*DB) LinkProjects ¶
func (*DB) ListDirtyProjects ¶
func (*DB) ListPreferencesByProject ¶
func (*DB) ListSessions ¶
func (d *DB) ListSessions(f SessionFilter) ([]Session, int, error)
func (*DB) SearchPreferences ¶
func (d *DB) SearchPreferences(query string) ([]Preference, error)
func (*DB) SearchSimilar ¶
func (*DB) StoreEmbedding ¶
func (*DB) SupersedePreference ¶
func (*DB) UnlinkProjects ¶
func (*DB) UpdatePreference ¶
type EmbeddingResult ¶
type NullTime ¶
NullTime is a time.Time that is stored as a Unix timestamp in SQLite rather than the Go default string format. This allows proper round-tripping through the modernc.org/sqlite driver.
func ToNullTime ¶
ToNullTime converts a *time.Time to NullTime
type Preference ¶
Click to show internal directories.
Click to hide internal directories.