examples: extend iterator with more storage options

This commit is contained in:
Roman Khimov 2022-03-23 22:04:17 +03:00
parent 4c4e9c0371
commit 1d1b4d4c18
2 changed files with 13 additions and 0 deletions

View file

@ -22,3 +22,12 @@ func NotifyKeysAndValues() bool {
} }
return true 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
}

View file

@ -6,3 +6,7 @@ events:
parameters: parameters:
- name: value - name: value
type: Any type: Any
- name: Value
parameters:
- name: value
type: Any