示例#1
0
            public override void CheckConstraintRule(ConstraintRule rule, DynamicRecord record, RecordAccess records, CheckerEngine <DynamicRecord, Org.Neo4j.Consistency.report.ConsistencyReport_SchemaConsistencyReport> engine)
            {
                outerInstance.checkSchema(rule, record, records, engine);

                if (rule.ConstraintDescriptor.enforcesUniqueness())
                {
                    DynamicRecord previousObligation = outerInstance.indexObligations[rule.OwnedIndex] = record.Clone();
                    if (previousObligation != null)
                    {
                        engine.Report().duplicateObligation(previousObligation);
                    }
                }
            }
示例#2
0
            public override void CheckIndexRule(StoreIndexDescriptor rule, DynamicRecord record, RecordAccess records, CheckerEngine <DynamicRecord, Org.Neo4j.Consistency.report.ConsistencyReport_SchemaConsistencyReport> engine)
            {
                outerInstance.checkSchema(rule, record, records, engine);

                if (rule.CanSupportUniqueConstraint() && rule.OwningConstraint != null)
                {
                    DynamicRecord previousObligation = outerInstance.constraintObligations[rule.OwningConstraint] = record.Clone();
                    if (previousObligation != null)
                    {
                        engine.Report().duplicateObligation(previousObligation);
                    }
                }
            }