Skip to content

Commit e813dde

Browse files
authored
Merge pull request #24 from Clarilab/fix-invalid-mongodb-aggregation-synthax
chore[eventstore/mongodb]: fix invalid aggregation syntax
2 parents 6aef320 + 36cc33d commit e813dde

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

eventstore/mongodb/eventstore.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ func (s *EventStore) LoadFrom(ctx context.Context, id uuid.UUID, version int) ([
299299
"input": "$events",
300300
"as": "events",
301301
"cond": bson.M{
302-
"version": bson.M{"$gte": version},
302+
"$gte": []interface{}{"$$events.version", version},
303303
},
304304
},
305305
},
@@ -318,7 +318,7 @@ func (s *EventStore) LoadUntil(ctx context.Context, id uuid.UUID, version int) (
318318
"input": "$events",
319319
"as": "events",
320320
"cond": bson.M{
321-
"version": bson.M{"$lte": version},
321+
"$lte": []interface{}{"$$events.version", version},
322322
},
323323
},
324324
},

examples/guestlist/mongodb/mongodb_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import (
3535
"github.com/Clarilab/eventhorizon/examples/guestlist/domains/guestlist"
3636
)
3737

38-
func ExampleIntegration() {
38+
func Example() {
3939
if testing.Short() {
4040
// Skip test when not running integration, fake success by printing.
4141
fmt.Println(`invitation: Athena - confirmed

examples/guestlist/outbox/outbox_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
"github.com/Clarilab/eventhorizon/examples/guestlist/domains/guestlist"
3737
)
3838

39-
func ExampleIntegration() {
39+
func Example() {
4040
if testing.Short() {
4141
// Skip test when not running integration, fake success by printing.
4242
fmt.Println(`invitation: Athena - confirmed

0 commit comments

Comments
 (0)