Handle both bson.D and bson.M on Find results
This commit is contained in:
@@ -4,8 +4,6 @@ import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
// "runtime"
|
||||
|
||||
"go.mongodb.org/mongo-driver/v2/mongo"
|
||||
"go.mongodb.org/mongo-driver/v2/mongo/options"
|
||||
"go.mongodb.org/mongo-driver/v2/bson"
|
||||
@@ -19,8 +17,6 @@ func (c *MongoClient) CreateViews(db *mongo.Database, cdef *CollectionDefinition
|
||||
return
|
||||
}
|
||||
|
||||
// runtime.Breakpoint()
|
||||
|
||||
for name, defVal := range cdef.Views {
|
||||
|
||||
// 1. Decode definition
|
||||
|
||||
Reference in New Issue
Block a user