update changelog and readme

pull/11/head
Timothée Rebours 3 years ago
parent da532719af
commit 9694697da4
  1. 3
      CHANGELOG.md
  2. 29
      README.md

@ -43,6 +43,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- `Executor#push` replaced with `Executor#pushAsync` which is substantially different;
- Storage modules : callback-based functions have been replaced with promise-based functions.
- Model module: it has been slightly re-written for clarity, but no changes in its interface was made.
- Typings were updated accordingly.
## Deprecated
- Using a `string` in the constructor of NeDB is now deprecated.
@ -62,6 +63,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.2.0] - 2021-10-29
### Added
- Include a `"react-native"` version (heavily inspired from [react-native-local-mongdb](https://github.com/antoniopresto/react-native-local-mongodb)).
### Changed
- The browser version uses `browser-version/lib/storage.browser.js` instead of `browser-version/lib/storage.js` in the `"browser"` field of the package.json.
## [2.1.0] - 2021-10-21
Thanks to [@eliot-akira](https://github.com/eliot-akira) for the amazing work on file streaming.

@ -29,12 +29,7 @@ const Datastore = require('@seald-io/nedb')
## Documentation
The API is a subset of MongoDB's API (the most used operations).
### JSDoc
You can read the markdown version of the JSDoc [in the docs directory](./API.md).
It is generated by running `npm run generateDocs:markdown`.
### Promise-based interface vs callback-based interface
Since version 3.0.0, NeDB provides a Promise-based equivalent for each function
Since version [3.0.0](./CHANGELOG.md#300---unreleased), NeDB provides a Promise-based equivalent for each function
which is suffixed with `Async`, for example `loadDatabaseAsync`.
The original callback-based interface is still available, fully retro-compatible
@ -44,7 +39,25 @@ version.
Don't hesitate to open an issue if it breaks something in your project.
The rest of the readme will only show the Promise-based API, the full
documentation is available in the [`docs`](./API.md) directory of the repository.
documentation is available in the [`API.md`](./API.md) file at the root of the
repository. It is generated by running `npm run generateDocs:markdown`.
* [Creating/loading a database](#creatingloading-a-database)
* [Dropping a database](#dropping-a-database)
* [Persistence](#persistence)
* [Inserting documents](#inserting-documents)
* [Finding documents](#finding-documents)
* [Basic Querying](#basic-querying)
* [Operators ($lt, $lte, $gt, $gte, $in, $nin, $ne, $stat, $regex)](#operators-lt-lte-gt-gte-in-nin-ne-stat-regex)
* [Array fields](#array-fields)
* [Logical operators $or, $and, $not, $where](#logical-operators-or-and-not-where)
* [Sorting and paginating](#sorting-and-paginating)
* [Projections](#projections)
* [Counting documents](#counting-documents)
* [Updating documents](#updating-documents)
* [Removing documents](#removing-documents)
* [Indexing](#indexing)
* [Other environments](#other-environments)
### Creating/loading a database
@ -110,7 +123,7 @@ the end of the datafile, for performance reasons. The database is automatically
compacted (i.e. put back in the one-line-per-document format) every time you
load each database within your application.
**Breaking change**: since v3.0.0, calling methods of `yourDatabase.persistence`
**Breaking change**: [since v3.0.0](./CHANGELOG.md#300---unreleased), calling methods of `yourDatabase.persistence`
is deprecated. The same functions exists directly on the `Datastore`.
You can manually call the compaction function

Loading…
Cancel
Save