nemophrostN
Convex Community3y ago
3 replies
nemophrost

Upper and lower bound index query expressions with different field names

I'm getting a Typescript error, so I assume it isn't possible, but I thought I'd ask. Is it possible to use different field names for the upper and lower bound expressions in an index query (assuming it still follows the rule about keeping the same order as the fields in the index)? Or will it/could it be?
.withIndex('by_notebook_endDate_startDate', (q) =>
  q.eq('notebook', notebookId).gte('endDate', start).lt('startDate', start)
)
Was this page helpful?