diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-04-15 12:03:21 +0100 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-04-15 12:05:20 +0100 |
| commit | 5b2166496e5f3ff2c4276e0b5b28f109c70673d5 (patch) | |
| tree | 93c351f6ef7d3d60d60247d5dbf531496f14a06c /src/sql.cpp | |
| parent | 3ce6cf305572709332d7329674ec45c987a093ad (diff) | |
| download | webstat-5b2166496e5f3ff2c4276e0b5b28f109c70673d5.tar.bz2 webstat-5b2166496e5f3ff2c4276e0b5b28f109c70673d5.tar.xz webstat-5b2166496e5f3ff2c4276e0b5b28f109c70673d5.zip | |
Replace use of crc32 for entity id
Entity value is MD5 hashed same as DB unique key, but the id itself is
now taken from the DB primary key which is sequence generated.
Diffstat (limited to 'src/sql.cpp')
| -rw-r--r-- | src/sql.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sql.cpp b/src/sql.cpp index da95f18..801a905 100644 --- a/src/sql.cpp +++ b/src/sql.cpp @@ -1,5 +1,6 @@ #include "sql.hpp" #include <command.h> +#include <dbpp-postgresql/pq-command.h> namespace WebStat::SQL { // ccache doesn't play nicely with #embed @@ -22,7 +23,8 @@ namespace WebStat::SQL { #embed "sql/hostUpsert.sql" }; #define HASH_OPTS(VAR) \ - const DB::CommandOptionsPtr VAR##_OPTS = std::make_shared<DB::CommandOptions>(std::hash<std::string> {}(VAR)) + const DB::CommandOptionsPtr VAR##_OPTS \ + = std::make_shared<PQ::CommandOptions>(std::hash<std::string> {}(VAR), 35, false) HASH_OPTS(ACCESS_LOG_INSERT); HASH_OPTS(ACCESS_LOG_PURGE_OLD); HASH_OPTS(ENTITY_INSERT); |
