Releases: chenmingyong0423/go-mongox
Releases · chenmingyong0423/go-mongox
v2.3.0
v2.2.3
What's Changed
- fix: Resolve the issue where FindOneAndUpdate does not update the timestamp by @hejiangda in #84
New Contributors
- @hejiangda made their first contribution in #84
Full Changelog: v2.2.2...v2.2.3
Go Mongox 2.2.2
What's Changed
- Bump go.mongodb.org/mongo-driver/v2 from v2.0.0 to v2.0.1 by @chenmingyong0423 in #83
Full Changelog: v2.2.1...v2.2.2
v2.2.1
refresh cache
Full Changelog: v2.2.0...v2.2.1
v2.2.0
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*
andafter*
actions. - mongox.model: The
mongox.model
now includes themongox:autoID
tag for theID
field, enabling automatic generation ofID
values. - mongox.Client Struct: Added a
mongox.Client
struct, which currently only createsDatabase
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 amongox.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
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
What's Changed
- Bump go.mongodb.org/mongo-driver from 1.17.1 to 1.17.2 by @chenmingyong0423 in #71
Full Changelog: v1.7.0...v1.8.0
v2.0.0
What's Changed
- export the interfaces by @chenmingyong0423 in #64
- Bump github.com/go-playground/validator/v10 from 10.20.0 to 10.23.0 by @chenmingyong0423 in #66
- Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 by @chenmingyong0423 in #67
- Bump go.mongodb.org/mongo-driver/v2 from v2.0.0-beta2 to v2.0.0 by @chenmingyong0423 in #68
Full Changelog: v2.0.0-beta1...v2.0.0
v1.7.0
What's Changed
- export the interfaces by @chenmingyong0423 in #63
- Bump github.com/go-playground/validator/v10 from 10.20.0 to 10.23.0 by @chenmingyong0423 in #69
- Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 by @chenmingyong0423 in #70
Full Changelog: v1.6.0...v1.7.0
Go Mongox 2.0.0-beta1
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 updateUpsert
method for compatibility with mongo-driver v2 - finder: Adjust
Options
parameters and updateDistinct
andDistinctWithParse
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