// // bson.go // Copyright (C) 2023 tiglog // // Distributed under terms of the MIT license. // package mgodb import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" ) // M is an unordered representation of a BSON document. // bson.M{"foo": "bar", "hello": "world", "pi": 3.14159} type M = bson.M // A D should not be constructed with duplicate key names, as that can cause undefined server behavior. // bson.D{{"foo", "bar"}, {"hello", "world"}, {"pi", 3.14159}} type D = bson.D // An A is an ordered representation of a BSON array. // bson.A{"bar", "world", 3.14159, bson.D{{"qux", 12345}}} type A = bson.A type ObjectID = primitive.ObjectID // Collection is a handle to a MongoDB collection. It is safe for concurrent use by multiple goroutines. type Collection = mongo.Collection