From a84be46d879ad3bde0e4a0890ef1108bf5e10b0b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 23 Aug 2025 17:52:28 +0100 Subject: Return count of entities passed to the database --- src/ingestor.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/ingestor.hpp') diff --git a/src/ingestor.hpp b/src/ingestor.hpp index 07a9a7d..53ba81f 100644 --- a/src/ingestor.hpp +++ b/src/ingestor.hpp @@ -24,9 +24,11 @@ namespace WebStat { void ingestLog(std::FILE *); void ingestLogLine(std::string_view); - template void storeEntity(const T &) const; - void storeEntity(Entity) const; - void storeEntity(std::optional) const; + template [[nodiscard]] size_t storeEntity(const T &) const; + // NOLINTNEXTLINE(modernize-use-nodiscard); testing exposition only + size_t storeEntity(Entity) const; + // NOLINTNEXTLINE(modernize-use-nodiscard); testing exposition only + size_t storeEntity(std::optional) const; template void storeLogLine(const std::tuple &) const; protected: @@ -35,7 +37,7 @@ namespace WebStat { size_t linesDiscarded = 0; private: - template void storeEntities(const std::tuple &) const; + template size_t storeEntities(const std::tuple &) const; uint32_t hostnameId; DB::ConnectionPtr dbconn; -- cgit v1.2.3