Split doc operator

This commit is contained in:
Mike Farah
2021-02-11 10:58:40 +11:00
parent 02ef99560d
commit 626e9cacaf
8 changed files with 89 additions and 3 deletions
+18
View File
@@ -0,0 +1,18 @@
package yqlib
import (
"container/list"
)
func splitDocumentOperator(d *dataTreeNavigator, matchMap *list.List, expressionNode *ExpressionNode) (*list.List, error) {
log.Debugf("-- splitDocumentOperator")
var index uint = 0
for el := matchMap.Front(); el != nil; el = el.Next() {
candidate := el.Value.(*CandidateNode)
candidate.Document = index
index = index + 1
}
return matchMap, nil
}