From 35a1a89baf77d948b7953b9f25451711cf60ff1f Mon Sep 17 00:00:00 2001 From: d3m0k1d Date: Thu, 19 Feb 2026 11:22:52 +0300 Subject: [PATCH] fix: run tests in storage --- internal/storage/writer.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/storage/writer.go b/internal/storage/writer.go index f135feb..d822eb3 100644 --- a/internal/storage/writer.go +++ b/internal/storage/writer.go @@ -94,3 +94,13 @@ func WriteReq(db *RequestWriter, resultCh <-chan *LogEntry) { } } } + +func (w *RequestWriter) GetRequestCount() (int, error) { + var count int + err := w.db.QueryRow("SELECT COUNT(*) FROM requests").Scan(&count) + return count, err +} + +func (w *RequestWriter) Close() error { + return w.db.Close() +}