mirror of
https://github.com/lightninglabs/faraday.git
synced 2026-08-13 12:33:35 +02:00
Add a PruneChannelEvents query that bounds the channel_events table by both size and age in a single statement: an id-keyset offset enforces a maximum event count and a timestamp filter enforces a retention window, OR-joined so each limit applies independently. The query returns the number of rows deleted so callers can surface pruning activity. Add a standalone timestamp index so the global age-based prune does not scan the full table. The existing composite index leads with channel_id and cannot serve a channel-agnostic timestamp filter. |
||
|---|---|---|
| .. | ||
| sqlc | ||
| interfaces.go | ||
| migrations.go | ||
| migrations_test.go | ||
| postgres.go | ||
| schemas.go | ||
| sql_migrations.go | ||
| sqlite.go | ||