Skip to content

Releases: chenmingyong0423/go-mongox

v2.3.0

28 Feb 06:37
e9cb132
Compare
Choose a tag to compare

What's Changed

  • Bump go.mongodb.org/mongo-driver/v2 from v2.0.1 to v2.1.0 by @codepzj in #87

New Contributors

Full Changelog: v2.2.3...v2.3.0

v2.2.3

27 Feb 02:47
77e8d6a
Compare
Choose a tag to compare

What's Changed

  • fix: Resolve the issue where FindOneAndUpdate does not update the timestamp by @hejiangda in #84

New Contributors

Full Changelog: v2.2.2...v2.2.3

Go Mongox 2.2.2

22 Feb 04:34
3f473ec
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.2.1...v2.2.2

v2.2.1

10 Feb 03:26
663a5d1
Compare
Choose a tag to compare

refresh cache

Full Changelog: v2.2.0...v2.2.1

v2.2.0

08 Feb 07:22
e681e67
Compare
Choose a tag to compare

What's Changed

  • Aggregator Operator: Now supports registering Hooks, allowing you to insert custom logic before and after aggregation operations.
  • Hook/Plugin Types: Added hook types for before* and after* actions.
  • mongox.model: The mongox.model now includes the mongox:autoID tag for the ID field, enabling automatic generation of ID values.
  • mongox.Client Struct: Added a mongox.Client struct, which currently only creates Database objects. More features, such as transaction handling, will be added in future versions.
  • mongox.Database Struct: Introduced the mongox.Database struct to support registering global plugins. This allows you to insert custom logic before and after database operations, enhancing the scalability and maintainability of applications.
  • mongox.NewCollection: Updated the signature of the mongox.NewCollection method, which now requires a mongox.Database object.
  • Model Field Hook Refactor: Moved the model field hook to the internal package and refactored it to support struct tagging, automatically filling field values during document insertion and updates. This reduces redundant code and improves maintainability and readability.
  • Global Plugin Registration: Removed the ability to register plugins globally; plugins must now be registered on the mongox.Database object.
  • Validation Hooks: Removed the validation struct validation hooks.
  • Plugin Initialization Function: Removed the mongox.InitPlugin function.

More Details: v2.2.0 changelog

v2.1.0

26 Jan 07:32
41425eb
Compare
Choose a tag to compare

What's Changed

  • feat(model): Add DeletedAt field to model for soft delete support by @chenmingyong0423 in #73
  • fix(model): add omitempty tag to DeletedAt field for BSON serialization by @chenmingyong0423 in #74
  • feat: finder support skip, limit, sort in #77
  • feat: enhance updater support set fields by @jakenmbe in #78

New Contributors

Full Changelog: v2.0.0...v2.1.0

v1.8.0

16 Jan 14:21
8b67158
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.7.0...v1.8.0

v2.0.0

17 Dec 17:25
ae20b3a
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.0-beta1...v2.0.0

v1.7.0

17 Dec 17:13
b13284b
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.6.0...v1.7.0

Go Mongox 2.0.0-beta1

30 Oct 18:49
22f577f
Compare
Choose a tag to compare

Upgrade to v2 module and update dependencies

  • Update module and internal import paths to include /v2
  • Upgrade go.mongodb.org/mongo-driver dependency to v2
  • Update the README.md and README-zh_CN.md
  • creator, aggregator, deleter: Adjust Options parameters for compatibility with mongo-driver v2
  • updater: Adjust Options parameters and update Upsert method for compatibility with mongo-driver v2
  • finder: Adjust Options parameters and update Distinct and DistinctWithParse methods for compatibility with mongo-driver v2
  • bson: Refactor dToM function for compatibility with mongo-driver v2

Full Changelog: v1.6.0...v2.0.0-beta1