MCPcopy Create free account
hub / github.com/astercloud/aster / GetTopK

Method GetTopK

pkg/memory/logic/store_postgres.go:322–324  ·  view source on GitHub ↗

GetTopK 获取 TopK Memory

(ctx context.Context, namespace string, k int, orderBy OrderBy)

Source from the content-addressed store, hash-verified

320
321// GetTopK 获取 TopK Memory
322func (s *PostgreSQLStore) GetTopK(ctx context.Context, namespace string, k int, orderBy OrderBy) ([]*LogicMemory, error) {
323 return s.List(ctx, namespace, WithTopK(k), WithOrderBy(orderBy))
324}
325
326// IncrementAccessCount 增加访问计数
327func (s *PostgreSQLStore) IncrementAccessCount(ctx context.Context, namespace, key string) error {

Callers

nothing calls this directly

Calls 3

ListMethod · 0.95
WithTopKFunction · 0.85
WithOrderByFunction · 0.85

Tested by

no test coverage detected