Questions tagged [nedb]

Embedded persistent database for Node.js, written in Javascript, with no dependency (except npm modules of course). You can think of it as a SQLite for Node.js projects, which can be used with a simple `require` statement. The API is a subset of MongoDB's. You can use it as a persistent or an in-memory only datastore.

About

NeDB is not intended to be a replacement of large-scale databases such as MongoDB! Its goal is to provide you with a clean and easy way to query data and persist it to disk, for web applications that do not need lots of concurrent connections, for example a continuous integration and deployment server and desktop applications built with Node Webkit or Electron.

Links

195 questions
2
votes
0 answers

getAllData does not include element just inserted, even after callback

So I am using NeDB as a data store for a simple little project, and I want to create a little API that inserts something new and returns the list of all items in the datastore, including the new one. async function willAddNewItem() { // db is…
KRyan
  • 7,308
  • 2
  • 40
  • 68
2
votes
1 answer

Using NeDB for testing, while using other DBs in FeatherJS application

I'm wondering if it is common practice to use an in-memory database for a test environment, instead of MySQL (that has to be used for development/production). If it makes sense, how do I set this up? I think I can create config/test.json as shown in…
houtenjack
  • 43
  • 9
2
votes
0 answers

MongoDb for offline data storage

Does Mongodb have a provision to store local data offline and upload data when online in android? Have read about NeDB and mini-mongo, which one is better?
Divya Nair
  • 39
  • 4
2
votes
1 answer

is there a way to prevent duplication of entries in neDB collection's array?

var addNewUser = function (id, chatId) { db.update({ _id: id }, { $push: { users: chatId } }, {}, function (err, numAffected) { // code after the record is updated }); } in this code I want to push new Id to the array if it is not…
Engineer Passion
  • 1,051
  • 1
  • 8
  • 14
2
votes
2 answers

Where is NEDB file stored?

var Datastore = require('nedb') , db = new Datastore({ filename: 'testdb.db', autoload: true });\ var doc = { hello: 'world' , n: 5 , today: new Date() , nedbIsAwesome: true , notthere:…
tonywei
  • 677
  • 2
  • 12
  • 25
2
votes
1 answer

Searching inside an object in NeDB/MongoDB

First of all, I am using feathers client together with nedb and I followed this documentation. So I have a json structured like this: { personal: { name: 'Robert' } }, { personal: { name: 'Mark' } }, { personal:…
wobsoriano
  • 12,348
  • 24
  • 92
  • 162
2
votes
2 answers

Protect nedb database with user/password.

I'am evaluating the use of nedb for one proyect. But it seems that natively it's don't support user/password protection. There is any way to protect an nedb database with user and password?
CStff
  • 361
  • 2
  • 10
2
votes
3 answers

How can i have auto-increment field in nedb?

I want to have exactly auto-increment field like relational or objective databases, so i need an integer _id field with automatically set field value, value should be one more last record _id value like…
Mehdi Yeganeh
  • 2,019
  • 2
  • 24
  • 42
2
votes
0 answers

Reference one document from another (SQL-style join) with NeDB

I have a bunch of documents in NeDB, let's say of the form: { _id : "3HDl4vDjQhcWvM76", type : "customer", name : "Bob" }, { _id : "65byNNj7578B9hyu", type : "action", customer : "3HDl4vDjQhcWvM76", ... }, (So an 'action' references a…
Gordon Williams
  • 1,856
  • 1
  • 17
  • 31
2
votes
1 answer

how to publish a page using node.js

I have just begun to learn node.js. Over the last two days, I've been working on a project that accepts userinput and publishes a ICS file. I have all of that working. Now consider when I have to show this data. I get a router.get to see if I am at…
masfenix
  • 7,736
  • 11
  • 45
  • 60
1
vote
0 answers

Electron nedb-promises storage file gets replaced on every app start

I'm now trying for a few hours to understand why this happens, in my electron app i would like to use the nedb-promises package("nedb-promises": "^6.2.1",). Installation and configuration works so far but on every app start (dev & prod) the db file…
Marco
  • 473
  • 5
  • 21
1
vote
1 answer

Security issues in neb and underscore

this is my first question and I hope I am not coming up with something totally stupid. I am new to JS and Node.js. I can solve easy issues on my own, but with this pollution report I need some advice. I received the following report: Severity:…
Klaus53123
  • 11
  • 3
1
vote
0 answers

RangeError: Maximum call stack size exceeded. Using nedb database, no recursion

I am using nedb as a database for a small discord bot I have created. Downloaded via npm install nedb --save, and set up in the main file with: const { callbackify } = require('util'); var db = new…
1
vote
0 answers

I am trying to display Base64 video, ( AngularJS, NeDB)

Anyone know about how to display Base64 video in angular js. I am trying to display the image in HTML i get this error https://i.stack.imgur.com/lAOvO.png In database storing like https://i.stack.imgur.com/V807z.pn My angular js controller…
Gajanan
  • 454
  • 4
  • 11
1
vote
2 answers

NodeJS nedb function not awaiting

Function checkExists is taking too long to execute. Tried to use await async function but had no effect. var exists = await checkExists(data.email); is returning undefined because not awaiting for checkExists. I have my index.js: const express =…
Gullen
  • 13
  • 4
1 2
3
12 13