private void VisitDegrees(StorageNodeCursor node, DegreeVisitor visitor)
 {
     _groupCursor.init(node.EntityReference(), node.RelationshipGroupReference());
     while (_groupCursor.next())
     {
         int loopCount = _groupCursor.loopCount();
         visitor.VisitDegree(_groupCursor.type(), _groupCursor.outgoingCount() + loopCount, _groupCursor.incomingCount() + loopCount);
     }
 }
        public override bool Next()
        {
            //We need to check tx state if there are new types added
            //on the first call of next
            if (!_hasCheckedTxState)
            {
                CheckTxStateForUpdates();
                _hasCheckedTxState = true;
            }

            if (!_storeCursor.next())
            {
                //We have now run out of groups from the store, however there may still
                //be new types that was added in the transaction that we haven't visited yet.
                return(NextFromTxState());
            }

            MarkTypeAsSeen(Type());
            return(true);
        }