JamesMGreene / nestdb

NestDB: An embedded persistent or in-memory database for Node.js, originally forked from NeDB
MIT License
58 stars 7 forks source link

Replace query syntax with a more complete MongoDB equivalent #1

Open JamesMGreene opened 7 years ago

JamesMGreene commented 7 years ago

Replace NeDB's quasi-MongoDB query syntax with the json-criteria module to get a full-blown and fully compatible MongoDB query syntax implementation.

Note that this module's README mentions the need to do the following:

// npm install babel --save
// Once at the entrypoint of your app.
require('babel/register')

However, note that this runtime registration can be avoided by doing something like the following:

  1. npm install --save-dev babel-cli@latest
  2. Add a "postinstall" script to the "package.json" file containing: cd node_modules && cd json-criteria && babel src -d lib && cd .. && cd ..
JamesMGreene commented 7 years ago

If at all possible, maintain basic compatibility with NeDB-based modules like:

JamesMGreene commented 3 years ago

Another option is kofrasa/mingo, MongoDB query syntax for in-memory objects. 🤔