First go at implementing rooms. A test passes that appears to exercise them.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4017 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-11-02 23:34:44 +00:00
parent 1abc611e54
commit b12f8f9da8
8 changed files with 692 additions and 83 deletions

View File

@ -114,7 +114,7 @@ void tf_ssb_db_init(tf_ssb_t* ssb)
populate_fts = true;
}
if (!populate_fts)
if (!populate_fts && /* HACK */ false)
{
printf("Checking FTS5 integrity...\n");
if (sqlite3_exec(db, "INSERT INTO messages_fts(messages_fts, rank) VALUES ('integrity-check', 0)", NULL, NULL, NULL) == SQLITE_CORRUPT_VTAB)
@ -279,6 +279,7 @@ bool tf_ssb_db_store_message(tf_ssb_t* ssb, JSContext* context, const char* id,
{
printf("%s\n", sqlite3_errmsg(db));
}
printf("changes = %d\n", sqlite3_changes(db));
stored = r == SQLITE_DONE && sqlite3_changes(db) != 0;
if (stored)
{