v0.0.310 debug
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m18s
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m18s
This commit is contained in:
parent
770f5c5c64
commit
bf6c184d12
@ -1,5 +1,5 @@
|
|||||||
package goext
|
package goext
|
||||||
|
|
||||||
const GoextVersion = "0.0.309"
|
const GoextVersion = "0.0.310"
|
||||||
|
|
||||||
const GoextVersionTimestamp = "2023-11-09T10:17:29+0100"
|
const GoextVersionTimestamp = "2023-11-09T11:40:48+0100"
|
||||||
|
@ -2,6 +2,8 @@ package wmo
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"go.mongodb.org/mongo-driver/bson"
|
"go.mongodb.org/mongo-driver/bson"
|
||||||
"go.mongodb.org/mongo-driver/mongo"
|
"go.mongodb.org/mongo-driver/mongo"
|
||||||
"gogs.mikescher.com/BlackForestBytes/goext/exerr"
|
"gogs.mikescher.com/BlackForestBytes/goext/exerr"
|
||||||
@ -45,6 +47,12 @@ func (c *Coll[TData]) Paginate(ctx context.Context, filter pag.Filter, page int,
|
|||||||
pipelineList := langext.ArrConcat(mongo.Pipeline{}, pipelineFilter, pipelinePaginate, c.extraModPipeline)
|
pipelineList := langext.ArrConcat(mongo.Pipeline{}, pipelineFilter, pipelinePaginate, c.extraModPipeline)
|
||||||
pipelineTotalCount := langext.ArrConcat(mongo.Pipeline{}, pipelineFilter, pipelineCount)
|
pipelineTotalCount := langext.ArrConcat(mongo.Pipeline{}, pipelineFilter, pipelineCount)
|
||||||
|
|
||||||
|
vv1, err := json.MarshalIndent(pipelineList, "", " ")
|
||||||
|
fmt.Printf("\n==============================\n%s\n==============================\n\n", string(vv1))
|
||||||
|
|
||||||
|
vv2, err := json.MarshalIndent(pipelineTotalCount, "", " ")
|
||||||
|
fmt.Printf("\n==============================\n%s\n==============================\n\n", string(vv2))
|
||||||
|
|
||||||
cursorList, err := c.coll.Aggregate(ctx, pipelineList)
|
cursorList, err := c.coll.Aggregate(ctx, pipelineList)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, pag.Pagination{}, exerr.Wrap(err, "mongo-aggregation failed").Any("pipeline", pipelineList).Str("collection", c.Name()).Build()
|
return nil, pag.Pagination{}, exerr.Wrap(err, "mongo-aggregation failed").Any("pipeline", pipelineList).Str("collection", c.Name()).Build()
|
||||||
|
Loading…
Reference in New Issue
Block a user