MCPcopy Create free account
hub / github.com/documentdb/documentdb / TraverseBson

Function TraverseBson

pg_documentdb_core/src/io/pgbson_utils.c:732–740  ·  view source on GitHub ↗

* 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

Source from the content-addressed store, hash-verified

730 * execution to allow for customization and persistence of state during traversal.
731 */
732void
733TraverseBson(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/*

Callers 14

bson_dollar_sizeFunction · 0.85
bson_dollar_allFunction · 0.85
bson_dollar_elemmatchFunction · 0.85
bson_dollar_regexFunction · 0.85
bson_dollar_rangeFunction · 0.85
bson_dollar_ninFunction · 0.85
BsonOrderbyCoreFunction · 0.85
CompareBsonAgainstQueryFunction · 0.85
BsonDollarInCoreFunction · 0.85
RenameSourceGetValueFunction · 0.85
bson_distinct_unwindFunction · 0.85

Calls 2

TraverseBsonCoreFunction · 0.85

Tested by

no test coverage detected