Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly propagate the synthesized columns
- Loading branch information
1 parent
bf21f31
commit a5faee9
Showing
3 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CREATE TABLE task | ||
( | ||
id TEXT NOT NULL, | ||
title TEXT NOT NULL, | ||
description TEXT, | ||
completed INTEGER NOT NULL, | ||
PRIMARY KEY(id) | ||
); | ||
|
||
CREATE VIRTUAL TABLE task_fts USING FTS4(title TEXT NOT NULL, description TEXT, content=task); | ||
|
||
CREATE TRIGGER content_sync_task_fts_BEFORE_UPDATE | ||
BEFORE UPDATE ON task | ||
BEGIN | ||
DELETE | ||
FROM task_fts | ||
WHERE docid=old.rowid; | ||
END; |