Skip to content

[FR] Support indexing #60

@FossPrime

Description

@FossPrime

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions