A community based topic aggregation platform built on atproto

feat(db): add comment query repository methods with hot ranking master

Implement database layer for comment queries with Lemmy hot ranking: New repository methods: - ListByParentWithHotRank: Query with hot/top/new sorting + pagination - Hot: log(greatest(2, score + 2)) / power(time_decay, 1.8) - Top: Score-based with optional timeframe filter - New: Chronological ordering - Cursor-based pagination with composite keys - GetByURIsBatch: Batch fetch comments by URIs (prevents N+1 queries) - GetVoteStateForComments: Fetch viewer votes (Phase 2B ready) Key features: - Hydrates author handle via JOIN with users table - Supports timeframe filters (hour/day/week/month/year/all) - Encodes cursors with hot_rank|score|created_at|uri - All queries use parameterized arguments (SQL injection safe) Formula prevents brigading: - greatest(2, score + 2) ensures log never goes negative - Heavily downvoted comments bounded at log(2) - Power of 1.8 for faster decay than posts (1.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>


+465
2 changed files