mongo_dal
TypeScript icon, indicating that this package has built-in type declarations

3.1.2 • Public • Published

MONGO_DAL

MogoDAL logo

Mongo DAL is a data access layer provided for the Code 3 code base. It's design was to provide a unified and easy means of interacting with a Mongo database in a asynchronous fashion. The exposed IMongoDAL interface aims to unify any database interactions by giving standardized methods that any implementing concrete DAL should provide. Additionally provided in the Mongo DAL are two concrete classes for creating a in-memory and remote database, with most of the heavy-lifting of these classes done by the native Node.js MongoDB driver.

Now includes an In Memory Database with all the functionality of the Mongo DAL!

Files

  • IMongoDAL.ts - An interface that exposes common methods for interacting with a Mongo database.
  • MongoDAL.ts - Some syntactic sugar around the MongoDB native methods, wrapped up in a convenient class.
  • MemoryMongoDAL.ts - A mirror of the MongoDAL.ts class, but creates an in-memory database. Of course, also wrapped up in a convenient class

Installation

This code is better interacted with as its NPM Package counterpart, but if you want to add some common concrete classes to it, or recompile you can:

BUILD 🔨
npm install
Test 🔎
npm test
Test In Memory Database 💪
npm imdbtest

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.1.2
    0
    • latest

Version History

Package Sidebar

Install

npm i mongo_dal

Weekly Downloads

6

Version

3.1.2

License

MIT

Unpacked Size

93.9 kB

Total Files

26

Last publish

Collaborators

  • yzhaopost
  • ryanwbell