diff --git a/examples/iterator/iterator.go b/examples/iterator/iterator.go index 4c830cf6f..a30233fb5 100644 --- a/examples/iterator/iterator.go +++ b/examples/iterator/iterator.go @@ -22,3 +22,12 @@ func NotifyKeysAndValues() bool { } return true } + +// NotifyValues sends notification with `foo` storage values. +func NotifyValues() bool { + iter := storage.Find(storage.GetContext(), []byte("foo"), storage.ValuesOnly) + for iterator.Next(iter) { + runtime.Notify("Value", iterator.Value(iter)) + } + return true +} diff --git a/examples/iterator/iterator.yml b/examples/iterator/iterator.yml index 1c6477104..ddd62c869 100644 --- a/examples/iterator/iterator.yml +++ b/examples/iterator/iterator.yml @@ -6,3 +6,7 @@ events: parameters: - name: value type: Any + - name: Value + parameters: + - name: value + type: Any