Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
levichevdmitry committed Apr 5, 2021
1 parent 19d42d4 commit a80ac6a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/pkg/persistence/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ <h2 id="MongoDbPersistence">type <a href="http://localhost:6060/src/persistence/
}

func (c * MyMongoDbPersistence) Set(correlatonId string, item MyData) (result interface{}, err error) {
newItem = cmpersist.CloneObject(item)
newItem = cmpersist.CloneObject(item, c.Prototype)
// Assign unique id if not exist
cmpersist.GenerateObjectId(&amp;newItem)
id := cmpersist.GetObjectId(newItem)
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ module github.com/pip-services3-go/pip-services3-mongodb-go
go 1.13

require (
github.com/aymerick/raymond v2.0.2+incompatible // indirect
github.com/google/go-cmp v0.3.1 // indirect
github.com/jinzhu/copier v0.1.0 // indirect
github.com/klauspost/compress v1.10.10 // indirect
github.com/pip-services3-go/pip-services3-commons-go v1.0.3
github.com/pip-services3-go/pip-services3-components-go v1.0.5
github.com/pip-services3-go/pip-services3-data-go v1.0.6
github.com/pip-services3-go/pip-services3-commons-go v1.1.0
github.com/pip-services3-go/pip-services3-components-go v1.1.0
github.com/pip-services3-go/pip-services3-data-go v1.1.0
github.com/pkg/errors v0.9.1 // indirect
github.com/stretchr/testify v1.4.0
github.com/stretchr/testify v1.7.0
github.com/xdg/stringprep v1.0.0 // indirect
go.mongodb.org/mongo-driver v1.3.5
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 // indirect
Expand Down
15 changes: 15 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a h1:zPPuIq2jAWWPTrGt7
github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a/go.mod h1:yL958EeXv8Ylng6IfnvG4oflryUi3vgA3xPs9hmII1s=
github.com/jinzhu/copier v0.1.0 h1:Vh8xALtH3rrKGB/XIRe5d0yCTHPZFauWPLvdpDAbi88=
github.com/jinzhu/copier v0.1.0/go.mod h1:24xnZezI2Yqac9J61UC6/dG/k76ttpq0DdJI3QmUvro=
github.com/jinzhu/copier v0.2.8 h1:N8MbL5niMwE3P4dOwurJixz5rMkKfujmMRFmAanSzWE=
github.com/jinzhu/copier v0.2.8/go.mod h1:24xnZezI2Yqac9J61UC6/dG/k76ttpq0DdJI3QmUvro=
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
Expand All @@ -54,6 +56,7 @@ github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
Expand All @@ -67,16 +70,24 @@ github.com/pip-services3-go/pip-services3-commons-go v1.0.1 h1:Dm2QMettphyXPVcwh
github.com/pip-services3-go/pip-services3-commons-go v1.0.1/go.mod h1:a2fIaCl4TUShJhgMMHmO+7773pf+Nkyrq1JDmJVYjd0=
github.com/pip-services3-go/pip-services3-commons-go v1.0.3 h1:ANb+nR2Efpp5+uyR2NLokPxeX9bzAcn/8+5Bvn6fp4Y=
github.com/pip-services3-go/pip-services3-commons-go v1.0.3/go.mod h1:a2fIaCl4TUShJhgMMHmO+7773pf+Nkyrq1JDmJVYjd0=
github.com/pip-services3-go/pip-services3-commons-go v1.0.4/go.mod h1:a2fIaCl4TUShJhgMMHmO+7773pf+Nkyrq1JDmJVYjd0=
github.com/pip-services3-go/pip-services3-commons-go v1.1.0 h1:KFMnjwVZxrFmNjzUwALdSxqORNzd2ikRI5zfVLy/W8w=
github.com/pip-services3-go/pip-services3-commons-go v1.1.0/go.mod h1:sEvS7LchPee+Z6yX+5IhKwinU7P8EgeCjYVRrWFg2+I=
github.com/pip-services3-go/pip-services3-components-go v1.0.0 h1:v2aJdHYohzNg50jcCrWDmprYRvXwhMaKnDXhNo3WkgM=
github.com/pip-services3-go/pip-services3-components-go v1.0.0/go.mod h1:Me/KFWw/xeMML89twlGdFKqnvprgt2qyi8xAV1+XKGs=
github.com/pip-services3-go/pip-services3-components-go v1.0.2 h1:46jDnLU9f4H+vIUKyTGY5MqZiTK7gKYjF6xU3iXZcWI=
github.com/pip-services3-go/pip-services3-components-go v1.0.2/go.mod h1:Me/KFWw/xeMML89twlGdFKqnvprgt2qyi8xAV1+XKGs=
github.com/pip-services3-go/pip-services3-components-go v1.0.5 h1:dYGTwSU3x1H1Dd+WPxEK+bEJo8a4tWIn62e977WlvdY=
github.com/pip-services3-go/pip-services3-components-go v1.0.5/go.mod h1:d07X90lapTm71vVz9tarpspmJj1qzfyR+Kjn1VwsknU=
github.com/pip-services3-go/pip-services3-components-go v1.1.0 h1:j05kZ1ngVhNC5P/BZIVrvwl3raguiDsQdw8P9zqjazo=
github.com/pip-services3-go/pip-services3-components-go v1.1.0/go.mod h1:IqDBQvff8tTlxccKwjEwJ0gajlXo+Er/68qhGrLmnpo=
github.com/pip-services3-go/pip-services3-data-go v1.0.4 h1:7WNt9uRTxDw+Z5ne9L0IKqBxAMqsMLbgRDYayOJsDAs=
github.com/pip-services3-go/pip-services3-data-go v1.0.4/go.mod h1:GlF516tSRHiEpQP5370Ttzl7eUEvH5B53xRS6/3r0cQ=
github.com/pip-services3-go/pip-services3-data-go v1.0.6 h1:rr1mf5l6TVmFa9EODavo7g/1FzQV6VyvwEMMQE1cA6I=
github.com/pip-services3-go/pip-services3-data-go v1.0.6/go.mod h1:XWc6E6NPVORnccDDKIjm3iDvH2b3eq+Rtz2pXTKAFQk=
github.com/pip-services3-go/pip-services3-data-go v1.1.0 h1:rEJHAUP6pJmRqqr8CZ85/xWaStGfy05FdJrP7yBQF+U=
github.com/pip-services3-go/pip-services3-data-go v1.1.0/go.mod h1:ePCpaMjY8kMw3vMspL11tYcvHX0SwxD7gnTstuqwqyQ=
github.com/pip-services3-go/pip-services3-expressions-go v1.0.0/go.mod h1:r7qffwvhUgK2k0DLT2GtsaNYofmL6Q8DHE+SirznBAU=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand All @@ -100,6 +111,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk=
Expand Down Expand Up @@ -153,3 +166,5 @@ gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
6 changes: 3 additions & 3 deletions persistence/IdentifiableMongoDbPersistence.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func (c *IdentifiableMongoDbPersistence) Create(correlationId string, item inter
return nil, nil
}
var newItem interface{}
newItem = cmpersist.CloneObject(item)
newItem = cmpersist.CloneObject(item, c.Prototype)
// Assign unique id if not exist
cmpersist.GenerateObjectId(&newItem)
newItem = c.ConvertFromPublic(newItem)
Expand Down Expand Up @@ -232,7 +232,7 @@ func (c *IdentifiableMongoDbPersistence) Set(correlationId string, item interfac
return nil, nil
}
var newItem interface{}
newItem = cmpersist.CloneObject(item)
newItem = cmpersist.CloneObject(item, c.Prototype)
// Assign unique id if not exist
cmpersist.GenerateObjectId(&newItem)
id := cmpersist.GetObjectId(newItem)
Expand Down Expand Up @@ -274,7 +274,7 @@ func (c *IdentifiableMongoDbPersistence) Update(correlationId string, item inter
return nil, nil
}
var newItem interface{}
newItem = cmpersist.CloneObject(item)
newItem = cmpersist.CloneObject(item, c.Prototype)
id := cmpersist.GetObjectId(newItem)
filter := bson.M{"_id": id}
update := bson.D{{"$set", newItem}}
Expand Down
4 changes: 2 additions & 2 deletions persistence/MongoDbPersistence.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Example:
}
func (c * MyMongoDbPersistence) Set(correlatonId string, item MyData) (result interface{}, err error) {
newItem = cmpersist.CloneObject(item)
newItem = cmpersist.CloneObject(item, c.Prototype)
// Assign unique id if not exist
cmpersist.GenerateObjectId(&newItem)
id := cmpersist.GetObjectId(newItem)
Expand Down Expand Up @@ -626,7 +626,7 @@ func (c *MongoDbPersistence) Create(correlationId string, item interface{}) (res
return nil, nil
}
var newItem interface{}
newItem = cmpersist.CloneObject(item)
newItem = cmpersist.CloneObject(item, c.Prototype)
newItem = c.ConvertFromPublic(newItem)
insRes, insErr := c.Collection.InsertOne(c.Connection.Ctx, newItem)
newItem = c.ConvertToPublic(newItem)
Expand Down

0 comments on commit a80ac6a

Please sign in to comment.