]> source.dussan.org Git - rspamd.git/commitdiff
Add simple insertion statement.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 19 Dec 2014 16:58:55 +0000 (16:58 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 19 Dec 2014 16:58:55 +0000 (16:58 +0000)
src/libserver/fuzzy_backend.c

index 2d33c4b92172baea96ebe41835265e9b90273522..e170a61a9664ee45f2790a1ea0c6d202743e747d 100644 (file)
@@ -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
        },
        {