Skip to content

Comment on NeDB, a pure Javascript database for Node.js and Node Webkit

Comments

Great idea and project. Questions: a) Is the database loosely coupled to query language implementation? b) In my biased opinion RethinkDB has a much better query language. Is there a way to implement RethinkDB's query semantics and how much work is involved? c) Underscore.js has a ton of collection manipulation functions. How easy is it to use it from within NeDB? d) How easy/difficult is it to run NeDB as a lightweight RESTful server, in its own Node process?

Thanks! To answer your questions:

a) and b) The database is loosely coupled with the query language implementation, so it could be possible to change the query semantics without breaking it. That said I have other priorities for now (some adaptation for Node Webkit, porting it to the browser).

c) NeDB queries return vanilla objects or array of objects , on which you can use all the underscore functions you want.

d) Depends what you want to do. If you want to write a REPL I think it shouldn't be too difficult, and it may be a good idea to do one. In the meantime, since the API is the same as MongoDB's, you can learn NeDB using MongoDB's REPL :)

Thank you. Can you elaborate your statement "you can learn NeDB using MongoDB's REPL"? Specifically steps to use MongoDB REPL connected to NeDB.

I was referring to the fact that the syntax is the same so if you don't know the NeDB syntax you can play with the MongoDB REPL. Appart from this there is no connection between the two.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.