-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Summary
Add indexing support somehow. Given this is an ESM module, there is a way to cheaply add this directly.
Who needs this
People who want a medium performance local database, such as those coming from NeDB, SQLite or who are downsizing from expensive Serverless MongoDB like services.
What ail does this alleviate
Low performance for documents over 10MB
Proposed Solution
If you need indexes you can save them as a separate index-only collection, so you keep the original file yaml/json compatible. Where to store the list of indexes is unclear to me. Every production database stores it in the database, which in LowDB would be an indexes.json file. However, as LowDB is DX oriented... requiring indexes to be defined in code seems prudent.
For the API I would try to keep to MongoDB's format, though it's a difficult one to parse. NeDB has a similar simplified format that could also work, but would introduce undesirable bad DX, which is antithetical to our purpose.