Example #1
0
        public override long?IndexGetOwningUniquenessConstraintId(IndexDescriptor index)
        {
            StoreIndexDescriptor storeIndexDescriptor = GetStoreIndexDescriptor(index);

            if (storeIndexDescriptor != null)
            {
                // Think of the index as being orphaned if the owning constraint is missing or broken.
                long?owningConstraint = storeIndexDescriptor.OwningConstraint;
                return(_schemaCache.hasConstraintRule(owningConstraint) ? owningConstraint : null);
            }
            return(null);
        }