v0.0.306
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m12s
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m12s
This commit is contained in:
parent
398ed56d32
commit
1672e8f8fd
@ -1,5 +1,5 @@
|
||||
package goext
|
||||
|
||||
const GoextVersion = "0.0.305"
|
||||
const GoextVersion = "0.0.306"
|
||||
|
||||
const GoextVersionTimestamp = "2023-11-09T09:35:56+0100"
|
||||
const GoextVersionTimestamp = "2023-11-09T09:36:41+0100"
|
||||
|
@ -43,3 +43,13 @@ func (c *Coll[TData]) InsertMany(ctx context.Context, valueIn []TData) (*mongo.I
|
||||
|
||||
return insRes, nil
|
||||
}
|
||||
|
||||
// InsertManyUnchecked behaves the same as InsertOne, but allows arbitrary data to be inserted (valueIn is []any instead of []TData)
|
||||
func (c *Coll[TData]) InsertManyUnchecked(ctx context.Context, valueIn []any) (*mongo.InsertManyResult, error) {
|
||||
insRes, err := c.coll.InsertMany(ctx, langext.ArrayToInterface(valueIn))
|
||||
if err != nil {
|
||||
return nil, exerr.Wrap(err, "mongo-query[insert-many] failed").Int("len(valueIn)", len(valueIn)).Str("collection", c.Name()).Build()
|
||||
}
|
||||
|
||||
return insRes, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user