· 6 years ago · Jun 30, 2019, 10:56 AM
1CREATE TABLE if NOT EXISTS posts (a INTEGER PRIMARY KEY);
2INSERT OR IGNORE INTO posts (a) VALUES(510000);
3INSERT OR IGNORE INTO posts (a) VALUES(510001);
4INSERT OR IGNORE INTO posts (a) VALUES(510300);
5CREATE VIRTUAL TABLE IF NOT EXISTS posts_fts using fts5(content=posts, content_rowid=a, a);
6
7SELECT * FROM posts_fts where posts_fts MATCH '10' ORDER BY a ASC;
8
90 rows returned in 2ms from: SELECT * FROM posts_fts where posts_fts match '10' ORDER BY a ASC;