perf: harden download and persistence lifecycle

This commit is contained in:
zarzet
2026-08-28 12:51:03 +07:00
parent 51f61c9c95
commit 45d9bbd7b2
22 changed files with 1656 additions and 231 deletions
+16
View File
@@ -87,5 +87,21 @@ void main() {
);
expect(autoVacuumMatches.single.start, lessThan(onCreateIndex));
});
test('enables delete triggers for replace-backed FTS synchronization', () {
expect(source, contains('PRAGMA recursive_triggers = ON'));
});
});
group('FTS5 search query', () {
test(
'quotes literal input and leaves unsupported short terms to fallback',
() {
expect(ftsPhraseSearchQuery('ab'), isNull);
expect(ftsPhraseSearchQuery('beat'), '"beat"');
expect(ftsPhraseSearchQuery('foo"bar'), '"foo""bar"');
expect(ftsPhraseSearchQuery('a\u0000b'), isNull);
},
);
});
}