Skip to content

Commit a173caa

Browse files
authored
Merge pull request #1785 from afumagalli98/1784
Sorted exadata export
2 parents fba532b + 4ff2c4f commit a173caa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api-service/database/exadata.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ func (md *MongoDatabase) FindAllExadataInstances(hidden bool) ([]model.OracleExa
256256
condition = bson.D{{Key: "hidden", Value: hidden}}
257257
}
258258

259-
pipeline := append(getExadataInstancePipeline, bson.D{{Key: "$match", Value: condition}})
259+
pipeline := append(getExadataInstancePipeline,
260+
bson.D{{Key: "$match", Value: condition}},
261+
bson.D{{Key: "$sort", Value: bson.D{{Key: "hostname", Value: 1}}}})
260262

261263
cur, err := md.Client.Database(md.Config.Mongodb.DBName).Collection(exadataCollection).
262264
Aggregate(ctx, pipeline)

0 commit comments

Comments
 (0)