src/execution_plan/ops/shared/traverse_functions.c
/* Populate the traverse context's edges array with all edges of the appropriate
 * direction connecting the source and destination nodes. */
Populate the traverse context's edges array with all edges of the appropriate
direction connecting the source and destination nodes.
Populate the traverse context ' s edges array with all edges of the appropriate direction connecting the source and destination nodes .
void Traverse_CollectEdges(EdgeTraverseCtx *edge_ctx, NodeID src, NodeID dest) {
	switch(edge_ctx->direction) {
	case GRAPH_EDGE_DIR_OUTGOING:
		_Traverse_CollectEdges(edge_ctx, src, dest);
		return;
	case GRAPH_EDGE_DIR_INCOMING:
		_Traverse_CollectEdges(edge_ctx, dest, src);
		return;
	case GRAPH_EDGE_DIR_BOTH:
		_Traverse_CollectEdges(edge_ctx, src, dest);
		_Traverse_CollectEdges(edge_ctx, dest, src);
		return;
	}
}
void Traverse_CollectEdges ( EdgeTraverseCtx * edge_ctx , NodeID src , NodeID dest ) { switch ( edge_ctx -> direction ) { case GRAPH_EDGE_DIR_OUTGOING : _Traverse_CollectEdges ( edge_ctx , src , dest ) ; return ; case GRAPH_EDGE_DIR_INCOMING : _Traverse_CollectEdges ( edge_ctx , dest , src ) ; return ; case GRAPH_EDGE_DIR_BOTH : _Traverse_CollectEdges ( edge_ctx , src , dest ) ; _Traverse_CollectEdges ( edge_ctx , dest , src ) ; return ; } }
Populate the traverse context's edges array with all edges of the appropriate
 direction connecting the source and destination nodes.
Populate the traverse context ' s edges array with all edges of the appropriate direction connecting the source and destination nodes .
// If we're traversing incoming edges, swap the source and destination. // If we're traversing in both directions, collect edges in both directions.