Skip to content

Releases: Artmann/esix

v3.2.0

06 Apr 08:50
Compare
Choose a tag to compare
  • feat: Add the aggregate function which can be used to run more complex aggregations.
  • perf: Limit the query to one document when using .first.
  • perf: Count documents in Mongo to avoid retrieving all documents.

3.1.0

05 Apr 21:52
Compare
Choose a tag to compare

Changed

  • feat: Sanitize queries to prevent NoSQL injections. If a query property is an object, we remove properties where the key starts with the $ character to avoid injections.

Added

  • feat: Add helpful aggregate functions to the Query Builder.

v3.0.2

04 Feb 19:37
Compare
Choose a tag to compare

Changed

  • perf: Reuse the connection to take advantage of Mongo's connection pooling.

v3.0.1

28 Dec 21:15
Compare
Choose a tag to compare

Changed

  • fix: BaseModel->find now supports IDs that are not ObjectIDs.

v3.0.0

25 Nov 18:22
Compare
Choose a tag to compare

Changed

Breaking: Look for documents using an ObjectId.

IDs in MongoDB can be stored as either strings or Object IDs. This meant that if you created a document
and let Mongo assign an id to it, Esix wouldn't be able to find it as it was only looking for the
hex representation.

With this change, BaseModel.find(id) will look for documents with either a matching Object id or
a string representation of it.