Low-latency AT Protocol interaction indexer.
20

Configure Feed

Select the types of activity you want to include in your feed.

store/query: return slice instead of null

Aly Raffauf (Jul 3, 2026, 8:59 PM EDT) 6205570e b0d2452f

+8
+8
internal/store/query.go
··· 47 47 return 0, nil, fmt.Errorf("count distinct dids: %w", err) 48 48 } 49 49 50 + dids = []string{} 51 + 50 52 rows, err := s.readDB.QueryContext(ctx, 51 53 `SELECT DISTINCT actor_did FROM links 52 54 WHERE target = ? AND collection = ? AND field_path = ? AND actor_did > ? ··· 94 96 return 0, nil, err 95 97 } 96 98 } 99 + 100 + records = []Record{} 97 101 98 102 query := `SELECT id, actor_did, collection, record_key FROM links WHERE ` + where 99 103 listArgs := append([]any{}, args...) ··· 164 168 return 0, nil, fmt.Errorf("count many to many: %w", err) 165 169 } 166 170 171 + items = []ManyToManyItem{} 172 + 167 173 listQuery := `SELECT a.id, a.actor_did, a.collection, a.record_key, b.target` + joinClause 168 174 listArgs := append([]any{}, args...) 169 175 ··· 219 225 220 226 where += ` AND b.target > ?` 221 227 args = append(args, after) 228 + 229 + counts = []OtherSubjectCount{} 222 230 223 231 query := `SELECT b.target, COUNT(*), COUNT(DISTINCT a.actor_did) 224 232 FROM links a JOIN links b