fix: 避免 Reader 有界空窗读取阻塞主线程

This commit is contained in:
hateyouing-ai committed 2026-11-10 15:27:06 +08:00
1 parent 804466aad8
commit 00b55c9cca
5 files changed
+442 -41

No files matched your search

+5 -1
View File
@@ -124,7 +124,11 @@ describe('WCDB message shard pagination', () => {
expect(sql).toContain('n.user_name AS sender_username')
expect(sql).toContain('n.rowid = m.real_sender_id')
expect(sql).toContain('"create_time" <= 1800000000')
expect(sql).toContain('ORDER BY "create_time" DESC LIMIT 20')
// Sync queries keep their established ordering; async pagination adds a
// stable local-id tie break and an explicit first-page offset.
expect(sql).toMatch(
/ORDER BY "create_time" DESC(?:, "local_id" DESC)? LIMIT 20(?: OFFSET 0)?/
)
const isLatestShard = dbPath.endsWith('message_7.db')
return [
{