Skip to content

Commit

Permalink
Remove commented out stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
lostlevels committed Sep 12, 2024
1 parent a45308d commit e044c84
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
26 changes: 0 additions & 26 deletions data/store/mongo/mongo_datum.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,6 @@ func (d *DatumRepository) EnsureIndexes() error {
},
}),
},
// {
// Keys: bson.D{
// {Key: "origin.id", Value: 1},
// {Key: "type", Value: 1},
// {Key: "deletedTime", Value: -1},
// {Key: "_active", Value: 1},
// },
// Options: options.Index().
// SetName("OriginId"),
// },
{
Keys: bson.D{
{Key: "_userId", Value: 1},
Expand All @@ -124,22 +114,6 @@ func (d *DatumRepository) EnsureIndexes() error {
Options: options.Index().
SetName("UploadId"),
},
// {
// Keys: bson.D{
// {Key: "_userId", Value: 1},
// {Key: "deviceId", Value: 1},
// {Key: "type", Value: 1},
// {Key: "_active", Value: 1},
// {Key: "_deduplicator.hash", Value: 1},
// },
// Options: options.Index().
// SetPartialFilterExpression(bson.D{
// {Key: "_active", Value: true},
// {Key: "_deduplicator.hash", Value: bson.D{{Key: "$exists", Value: true}}},
// {Key: "deviceId", Value: bson.D{{Key: "$exists", Value: true}}},
// }).
// SetName("DeduplicatorHash"),
// },
{
Keys: bson.D{
{Key: "_userId", Value: 1},
Expand Down
13 changes: 0 additions & 13 deletions data/store/mongo/mongo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,6 @@ var _ = Describe("Mongo", func() {
{Key: "time", Value: bson.D{{Key: "$gt", Value: primitive.NewDateTimeFromTime(lowerTimeIndex)}}},
}),
}),
// MatchFields(IgnoreExtras, Fields{
// "Key": Equal(storeStructuredMongoTest.MakeKeySlice("origin.id", "type", "-deletedTime", "_active")),
// "Name": Equal("OriginId"),
// }),
MatchFields(IgnoreExtras, Fields{
"Key": Equal(storeStructuredMongoTest.MakeKeySlice("_userId", "origin.id", "-deletedTime", "_active")),
"Name": Equal("UserIdOriginId"),
Expand All @@ -346,15 +342,6 @@ var _ = Describe("Mongo", func() {
"Key": Equal(storeStructuredMongoTest.MakeKeySlice("uploadId", "type", "-deletedTime", "_active")),
"Name": Equal("UploadId"),
}),
// MatchFields(IgnoreExtras, Fields{
// "Key": Equal(storeStructuredMongoTest.MakeKeySlice("_userId", "deviceId", "type", "_active", "_deduplicator.hash")),
// "Name": Equal("DeduplicatorHash"),
// "PartialFilterExpression": Equal(bson.D{
// {Key: "_active", Value: true},
// {Key: "_deduplicator.hash", Value: bson.D{{Key: "$exists", Value: true}}},
// {Key: "deviceId", Value: bson.D{{Key: "$exists", Value: true}}},
// }),
// }),
MatchFields(IgnoreExtras, Fields{
"Key": Equal(storeStructuredMongoTest.MakeKeySlice("_userId", "deviceId", "_deduplicator.hash")),
"Name": Equal("DeduplicatorHashNoType"),
Expand Down

0 comments on commit e044c84

Please sign in to comment.