Iterator: added support for iterators over dictionaries

This commit is contained in:
2026-04-19 15:08:14 +02:00
parent d7dd628fc9
commit 807df0f3a8
7 changed files with 280 additions and 26 deletions
+4 -2
View File
@@ -21,6 +21,8 @@ const (
CountName = "count"
FilterName = "filter"
MapName = "map"
KeyName = "key"
ValueName = "value"
)
type Iterator interface {
@@ -29,14 +31,14 @@ type Iterator interface {
Current() (item any, err error)
Index() int
Count() int
HasOperation(name string) bool
CallOperation(name string, args map[string]any) (value any, err error)
}
type ExtIterator interface {
Iterator
Reset() error
Clean() error
HasOperation(name string) bool
CallOperation(name string, args map[string]any) (value any, err error)
}
func errNoOperation(name string) error {