Skip to content
Snippets Groups Projects
Commit 4f1ca42f authored by Pavel Antonov's avatar Pavel Antonov :asterisk:
Browse files

Merge branch 'PRXS-1309/LocationFixBson' into 'master'

Заменен bsonx.Doc на bson.D в файле location.go

See merge request perxis/perxis-go!58
parents fdbf5b8b 63ac08a9
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,6 @@ import (
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/x/bsonx"
)
var locationType = &LocationType{}
......@@ -32,8 +31,8 @@ func (p LocationParameters) GetMongoIndexes(path string, f *Field) []mongo.Index
}
if f.Indexed {
add.Keys = bsonx.Doc{{Key: a, Value: bsonx.Int32(1)}}
geo.Keys = bsonx.Doc{{Key: g, Value: bsonx.String("2dsphere")}}
add.Keys = bson.D{{Key: a, Value: 1}}
geo.Keys = bson.D{{Key: g, Value: "2dsphere"}}
}
return []mongo.IndexModel{add, geo}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment