summaryrefslogtreecommitdiff
path: root/src/ingestor.hpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-08-23 17:52:28 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2025-08-25 16:02:43 +0100
commita84be46d879ad3bde0e4a0890ef1108bf5e10b0b (patch)
tree1f3a8fbb67031bbb339872c8e467d6d258762e5b /src/ingestor.hpp
parent7ec58bf3f72fd7e0396a37f43ff023731697ff8a (diff)
downloadwebstat-a84be46d879ad3bde0e4a0890ef1108bf5e10b0b.tar.bz2
webstat-a84be46d879ad3bde0e4a0890ef1108bf5e10b0b.tar.xz
webstat-a84be46d879ad3bde0e4a0890ef1108bf5e10b0b.zip
Return count of entities passed to the database
Diffstat (limited to 'src/ingestor.hpp')
-rw-r--r--src/ingestor.hpp10
1 files changed, 6 insertions, 4 deletions
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<typename T> void storeEntity(const T &) const;
- void storeEntity(Entity) const;
- void storeEntity(std::optional<Entity>) const;
+ template<typename T> [[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<Entity>) const;
template<typename... T> void storeLogLine(const std::tuple<T...> &) const;
protected:
@@ -35,7 +37,7 @@ namespace WebStat {
size_t linesDiscarded = 0;
private:
- template<typename... T> void storeEntities(const std::tuple<T...> &) const;
+ template<typename... T> size_t storeEntities(const std::tuple<T...> &) const;
uint32_t hostnameId;
DB::ConnectionPtr dbconn;