@remit/drizzle-service 0.0.30 → 0.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/repair/thread-message-category-contract.ts +507 -0
- package/src/repair/thread-message-category.sqlite.test.ts +101 -0
- package/src/repair/thread-message-category.test.ts +229 -0
- package/src/repair/thread-message-category.ts +426 -0
- package/src/repos/category-fixture.ts +156 -0
- package/src/repos/thread-message-category.test.ts +156 -0
- package/src/repos/thread-message.sqlite.test.ts +365 -1
- package/src/repos/thread-message.ts +7 -0
|
@@ -158,6 +158,13 @@ function buildSearchConditions(search: SearchOptions): SQL[] {
|
|
|
158
158
|
if (search.attachments !== undefined) {
|
|
159
159
|
conditions.push(eq(threadMessageTable.hasAttachment, search.attachments));
|
|
160
160
|
}
|
|
161
|
+
// An equality over a column on the row, so it sits inside the keyset window
|
|
162
|
+
// rather than filtering what the window returned: a page is a full page of
|
|
163
|
+
// matches however rare the category is. Served by
|
|
164
|
+
// tm_by_mailbox_category_date.
|
|
165
|
+
if (search.category?.length) {
|
|
166
|
+
conditions.push(inArray(threadMessageTable.category, search.category));
|
|
167
|
+
}
|
|
161
168
|
|
|
162
169
|
return conditions;
|
|
163
170
|
}
|