Example #1
0
        private void EnsureIgnoreNeighborInitialized()
        {
            if (_isIgnoreNeighborConditionInitialized)
            {
                return;
            }

            if (!string.IsNullOrEmpty(IgnoreNeighborCondition))
            {
                _ignoreNeighborCondition = new IgnoreRowNeighborCondition(
                    IgnoreNeighborCondition, GetSqlCaseSensitivity(), IsDirected);
            }

            _isIgnoreNeighborConditionInitialized = true;
        }
Example #2
0
        private bool IgnoreNeighbor([NotNull] IRow row, [NotNull] IRow neighbor,
                                    int neighborTableIndex)
        {
            EnsureIgnoreNeighborInitialized();
            if (_ignoreNeighborConditions == null || _ignoreNeighborConditions.Count == 0)
            {
                return(false);
            }

            IgnoreRowNeighborCondition condition =
                _ignoreNeighborConditions.Count == 1
                                        ? _ignoreNeighborConditions[0]
                                        : _ignoreNeighborConditions[neighborTableIndex];

            return(condition.IsFulfilled(row, 0, neighbor, neighborTableIndex + 1));
        }