Ejemplo n.º 1
0
            public long cardinalityByLabelsAndRelationshipType(int fromLabelId, int relTypeId, int toLabelId)
            {
                RelSpecifier specifier = new RelSpecifier(fromLabelId, relTypeId, toLabelId);
                long?        result    = _outerInstance.relCounts[specifier];

                return(result == null ? 0L : result.Value);
            }
Ejemplo n.º 2
0
        public override void VisitRelCount(int startLabelId, int relTypeId, int endLabelId, string relCountQuery, long relCount)
        {
            RelSpecifier specifier = new RelSpecifier(startLabelId, relTypeId, endLabelId);

            if (_relCounts.put(specifier, relCount) != null)
            {
                throw new System.ArgumentException(format("Duplicate rel count %s for relationship specifier %s (corresponding query: %s)", relCount, specifier, relCountQuery));
            }
        }
Ejemplo n.º 3
0
            public override bool Equals(object o)
            {
                if (this == o)
                {
                    return(true);
                }
                if (o == null || this.GetType() != o.GetType())
                {
                    return(false);
                }

                RelSpecifier that = ( RelSpecifier )o;

                return(FromLabelId == that.FromLabelId && RelTypeId == that.RelTypeId && ToLabelId == that.ToLabelId);
            }