New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

simpledblayer-mongo

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simpledblayer-mongo

MongoDB layer for simpledblayer

latest
Source
npmnpm
Version
0.3.57
Version published
Maintainers
1
Created
Source

simpledblayer-mongo

SimpleDbLayer is the MongoDB layer for simpledblayer It provides an incredibly fast mplementation of joins, by caching results in the records themselves. So, to fetch a person's record, along with her email addresses, addresses, and phone number, it's actually just one read DB operation (!) thanks to the aggressive caching happening (all children data is kept with the record).

The MongoDB layer deals with:

  • Update related collections when a collection is changed. This means that each record's cache is always up to date: if you update an email address, the affected contacts' cache is also updated (deletions, updates, inserts)
  • Re-work records marked as "dirty". If you change the schema for a collection, you will need to mark as "dirty" all of the records in related tables, since they will contain outdated information)

If a record is "dirty", the cache will be re-generated on the fly whenever a record is fetched.

Limitations

Unfortunately, doing a mass-update on a table with children in a 1:n relationship is not allowed because of MongoDB bug #1243, which prevents multuple update in cache from working (the $ positional operator won't work for sub-arrays).

Keywords

javascript

FAQs

Package last updated on 20 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts