add ChangeSet.GetUpdates

This commit is contained in:
Denis Mishin 2023-11-02 13:26:11 -04:00
parent b616e42768
commit 24f9f4d549

View file

@ -38,6 +38,11 @@ func (cs *ChangeSet) Upsert(record *Record) {
})
}
// Updates returns the change set's updates.
func (cs *ChangeSet) Updates() []*Record {
return cs.updates
}
// ApplyChanges applies the changes to the databroker.
func ApplyChanges(ctx context.Context, client DataBrokerServiceClient, changes *ChangeSet) error {
updates := OptimumPutRequestsFromRecords(changes.updates)