Beispiel #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void verifyDeferredConstraints(org.neo4j.storageengine.api.NodePropertyAccessor nodePropertyAccessor) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException
        public override void VerifyDeferredConstraints(NodePropertyAccessor nodePropertyAccessor)
        {
            try
            {
                LuceneIndex.verifyUniqueness(nodePropertyAccessor, Descriptor.schema().PropertyIds);
            }
            catch (IOException e)
            {
                throw new UncheckedIOException(e);
            }
        }
Beispiel #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void verifyDeferredConstraints(org.neo4j.storageengine.api.NodePropertyAccessor accessor) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException
        public override void VerifyDeferredConstraints(NodePropertyAccessor accessor)
        {
            try
            {
                LuceneIndex.verifyUniqueness(accessor, _propertyKeyIds);
            }
            catch (IOException e)
            {
                throw new UncheckedIOException(e);
            }
        }
Beispiel #3
0
        /// <summary>
        /// used by the consistency checker
        /// </summary>
        public static LongIterator ExactIndexMatches(NodePropertyAccessor accessor, LongIterator indexedNodeIds, params IndexQuery[] predicates)
        {
            if (!indexedNodeIds.hasNext())
            {
                return(indexedNodeIds);
            }

//JAVA TO C# CONVERTER TODO TASK: Method reference constructor syntax is not converted by Java to C# Converter:
            IndexQuery[] filteredPredicates = java.util.predicates.Where(LookupFilter.isNumericOrGeometricPredicate).ToArray(IndexQuery[] ::new);

            if (filteredPredicates.Length > 0)
            {
                System.Func <long, bool> combinedPredicate = nodeId =>
                {
                    try
                    {
                        foreach (IndexQuery predicate in filteredPredicates)
                        {
                            int   propertyKeyId = predicate.propertyKeyId();
                            Value value         = accessor.GetNodePropertyValue(nodeId, propertyKeyId);
                            if (!predicate.acceptsValue(value))
                            {
                                return(false);
                            }
                        }
                        return(true);
                    }
                    catch (EntityNotFoundException)
                    {
                        return(false);                          // The node has been deleted but was still reported from the index. CC will catch
                        // this through other mechanism (NodeInUseWithCorrectLabelsCheck), so we can
                        // silently ignore here
                    }
                };
                return(PrimitiveLongCollections.filter(indexedNodeIds, combinedPredicate));
            }
            return(indexedNodeIds);
        }
 internal TemporalIndexPopulatingUpdater(TemporalIndexPopulator populator, NodePropertyAccessor nodePropertyAccessor) : base(new PartFactory(populator, nodePropertyAccessor))
 {
 }
Beispiel #5
0
 public abstract void DistinctValues(IndexProgressor_NodeValueClient client, Org.Neo4j.Storageengine.Api.NodePropertyAccessor propertyAccessor, bool needsValues);
Beispiel #6
0
 public override void DistinctValues(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, NodePropertyAccessor propertyAccessor, bool needsValues)
 {
     @delegate.DistinctValues(client, propertyAccessor, needsValues);
 }
Beispiel #7
0
 public override IndexUpdater NewPopulatingUpdater(NodePropertyAccessor nodePropertyAccessor)
 {
     return(new NonUniqueLuceneIndexPopulatingUpdater(Writer, _sampler));
 }
Beispiel #8
0
 internal CompositeDuplicateCheckingCollector(NodePropertyAccessor accessor, int[] propertyKeyIds) : base(accessor, StatementConstants.NO_SUCH_PROPERTY_KEY)
 {
     this._propertyKeyIds = propertyKeyIds;
 }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void verifyDeferredConstraints(org.neo4j.storageengine.api.NodePropertyAccessor nodePropertyAccessor) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException
        public override void VerifyDeferredConstraints(NodePropertyAccessor nodePropertyAccessor)
        {
            _accessor.verifyDeferredConstraints(nodePropertyAccessor);
        }
Beispiel #10
0
 public override void VerifyDeferredConstraints(NodePropertyAccessor accessor)
 {
     // no constraints to verify so do nothing
 }
Beispiel #11
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected:
//ORIGINAL LINE: public org.neo4j.kernel.api.index.IndexUpdater newPopulatingUpdater(final org.neo4j.storageengine.api.NodePropertyAccessor accessor)
        public override IndexUpdater NewPopulatingUpdater(NodePropertyAccessor accessor)
        {
            return(new UniqueLuceneIndexPopulatingUpdater(Writer, _propertyKeyIds, LuceneIndex, accessor, _sampler));
        }
 internal PartFactory(TemporalIndexPopulator populator, NodePropertyAccessor nodePropertyAccessor)
 {
     this.Populator            = populator;
     this.NodePropertyAccessor = nodePropertyAccessor;
 }
Beispiel #13
0
 public abstract void VerifyDeferredConstraints(Org.Neo4j.Storageengine.Api.NodePropertyAccessor nodePropertyAccessor);
Beispiel #14
0
 public abstract IndexUpdater NewPopulatingUpdater(Org.Neo4j.Storageengine.Api.NodePropertyAccessor accessor);
Beispiel #15
0
 internal DuplicateCheckingCollector(NodePropertyAccessor accessor, int propertyKeyId)
 {
     this.Accessor       = accessor;
     this._propertyKeyId = propertyKeyId;
 }
Beispiel #16
0
 internal static DuplicateCheckingCollector ForProperties(NodePropertyAccessor accessor, int[] propertyKeyIds)
 {
     return((propertyKeyIds.Length == 1) ? new DuplicateCheckingCollector(accessor, propertyKeyIds[0]) : new CompositeDuplicateCheckingCollector(accessor, propertyKeyIds));
 }
Beispiel #17
0
 public override void DistinctValues(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, NodePropertyAccessor propertyAccessor, bool needsValues)
 {
     throw new System.NotSupportedException("Fulltext indexes does not support distinctValues queries");
 }