From 2842b1e478bd911eda98d8a0b1e66054f934d5d7 Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Sat, 6 Jul 2024 10:03:18 -1000 Subject: [PATCH] Adding TODOs. --- sources/mongo/change_event.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/mongo/change_event.go b/sources/mongo/change_event.go index 9cb73c68..df796f4c 100644 --- a/sources/mongo/change_event.go +++ b/sources/mongo/change_event.go @@ -15,6 +15,7 @@ type ChangeEvent struct { } func NewChangeEvent(rawChangeEvent bson.M) (*ChangeEvent, error) { + // TODO: Add tests operationType, isOk := rawChangeEvent["operationType"] if !isOk { return nil, fmt.Errorf("failed to get operationType from change event: %v", rawChangeEvent) @@ -93,6 +94,7 @@ func (c ChangeEvent) getFullDocument() (bson.M, error) { } func (c ChangeEvent) ToMessage() (*Message, error) { + // TODO: Add tests switch c.operationType { case "delete": // TODO: Think about providing the `before` row for a deleted event.