summaryrefslogtreecommitdiff
path: root/src/ingestor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ingestor.cpp')
-rw-r--r--src/ingestor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ingestor.cpp b/src/ingestor.cpp
index e316e84..8547745 100644
--- a/src/ingestor.cpp
+++ b/src/ingestor.cpp
@@ -121,10 +121,14 @@ namespace WebStat {
size_t
Ingestor::storeEntity(const Entity entity) const
{
+ if (existingEntities.contains(entity.first)) {
+ return 0;
+ }
auto insert = dbconn->modify(SQL::ENTITY_INSERT, SQL::ENTITY_INSERT_OPTS);
insert->bindParamI(0, entity.first);
insert->bindParamS(1, entity.second);
insert->execute();
+ existingEntities.emplace(entity.first);
return 1;
}