Index on two fields
startDate: v.string(),
endDate: v.string()
.index("by_date_range", ["startDate", "endDate"]);
.index("by_date_range", ["startDate", "endDate"]);
3 Replies
This index allows you to query contiguous ranges of documents in [startDate, endDate] order. This can be useful but might not support all of your queries. What is your query pattern? You can try to write it in Convex and if it compiles then you're good. Or you can describe it with SQL and we can think about how to write equivalent Convex code
Databases are Spreadsheets
I want to share my mental model of databases:
- Databases are just big spreadsheets
- An index is just a view of the spreadsheet sorted by one or mor...
thanks lee. was looking for some additional info on querying too. this has it