Reset() and Clean() have new, simpler signature

This commit is contained in:
2024-09-12 05:44:29 +02:00
parent ad3c1e5a60
commit d215d837f6
4 changed files with 18 additions and 6 deletions
+3 -1
View File
@@ -92,6 +92,7 @@ func evalIterator(ctx ExprContext, opTerm *term) (v any, err error) {
if ds != nil {
var dc *dataCursor
dcCtx := ctx.Clone()
if initFunc, exists := ds[InitName]; exists && initFunc != nil {
var args []any
var resource any
@@ -109,9 +110,10 @@ func evalIterator(ctx ExprContext, opTerm *term) (v any, err error) {
if resource, err = initFunc.InvokeNamed(initCtx, InitName, actualParams); err != nil {
return
}
dcCtx := ctx.Clone()
exportObjects(dcCtx, initCtx)
dc = NewDataCursor(dcCtx, ds, resource)
} else {
dc = NewDataCursor(dcCtx, ds, nil)
}
v = dc