* Top level function that traverses a document given by documentIterator, * for a specified traversalPath and applies the various Execution functions * depending on the state of the traversal. * The execution functions are an extensibility model allowing callers to specify * behavior on each level of traversal. The state variable is also passed in to the * execution to allow for customization
| 730 | * execution to allow for customization and persistence of state during traversal. |
| 731 | */ |
| 732 | void |
| 733 | TraverseBson(bson_iter_t *documentIterator, const char *traversalPath, |
| 734 | void *state, const TraverseBsonExecutionFuncs *executionFuncs) |
| 735 | { |
| 736 | bool inArrayContext = false; |
| 737 | StringView traverseView = CreateStringViewFromString(traversalPath); |
| 738 | TraverseBsonCore(documentIterator, &traverseView, state, executionFuncs, |
| 739 | inArrayContext); |
| 740 | } |
| 741 | |
| 742 | |
| 743 | /* |
no test coverage detected