3.0.1 • Published 1 month ago

sharedb-mingo-memory v3.0.1

Weekly downloads
217
License
MIT
Repository
github
Last release
1 month ago

ShareDBMingo

NPM Version Build Status Coverage Status

A database adapter for sharedb that implements a subset of Mongo operations using an in-memory database. This adapter can be useful for running application tests faster by not requiring a full database. It is also used by tests for sharedb itself.

Usage

var ShareDBMingo = require('sharedb-mingo-memory');
var db = new ShareDBMingo();

Another form is useful at times: ShareDBMingo.extendMemoryDB(MemoryDB). This creates a new ShareDBMingo class that extends from a particular MemoryDB class, in case there are more than one available. This is particularly important to ensure sharedb tests aren't testing the version of sharedb being used by sharedb-mingo-memory.

Queries

sharedb-mingo-memory uses mingo and supports the same queries mingo supports. In addition, some special top-level fields are supported, and map to Mongo cursor methods:

  • $orderby (TODO: rename to $sort)
  • $skip
  • $limit
  • $count

Other special operators that are supported in sharedb-mongo such as $mapReduce and $aggregate aren't supported and will throw an error if used.

3.0.1

1 month ago

3.0.0

12 months ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.0

2 years ago

2.0.0

2 years ago

1.2.0

3 years ago

1.1.5

3 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.0-beta

8 years ago

0.1.16

8 years ago

0.1.15

8 years ago

0.1.14

8 years ago

0.1.13

8 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago