summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-12-19 16:58:55 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-12-19 16:58:55 +0000
commit564a3f5456476587abc3b52c0952f4443d7de3b5 (patch)
treefc216ce39facfa3c0c16eef266dc967e17eb7db0
parent38959c45ea708597b7c1673f8dec3eb03b72a607 (diff)
downloadrspamd-564a3f5456476587abc3b52c0952f4443d7de3b5.tar.gz
rspamd-564a3f5456476587abc3b52c0952f4443d7de3b5.zip
Add simple insertion statement.
-rw-r--r--src/libserver/fuzzy_backend.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libserver/fuzzy_backend.c b/src/libserver/fuzzy_backend.c
index 2d33c4b92..e170a61a9 100644
--- a/src/libserver/fuzzy_backend.c
+++ b/src/libserver/fuzzy_backend.c
@@ -69,7 +69,8 @@ static struct rspamd_fuzzy_stmts {
"id INTEGER PRIMARY KEY,"
"flag INTEGER NOT NULL,"
"digest TEXT NOT NULL,"
- "value INTEGER);"
+ "value INTEGER,"
+ "time INTEGER);"
""
"CREATE TABLE shingles("
"value INTEGER NOT NULL,"
@@ -106,8 +107,9 @@ static struct rspamd_fuzzy_stmts {
},
{
.idx = RSPAMD_FUZZY_BACKEND_INSERT,
- .sql = "",
- .args = "",
+ .sql = "INSERT INTO digests(flag, digest, value, time) VALUES"
+ "(?1, ?2, ?3, ?4)",
+ .args = "ITII",
.stmt = NULL
},
{