Ejemplo n.º 1
0
        // effects: Given keys for this relation, adds one key constraint for
        // each key present in keys
        private void AddKeyConstraints(IEnumerable <ExtentKey> keys, BasicSchemaConstraints constraints)
        {
            foreach (var key in keys)
            {
                // If the key is being projected, only then do we add the key constraint

                var keySlots = MemberProjectedSlot.GetSlots(m_slots, key.KeyFields);
                if (keySlots != null)
                {
                    var keyConstraint = new BasicKeyConstraint(this, keySlots);
                    constraints.Add(keyConstraint);
                }
            }
        }
 private void AddKeyConstraints(
     IEnumerable <ExtentKey> keys,
     SchemaConstraints <BasicKeyConstraint> constraints)
 {
     foreach (ExtentKey key in keys)
     {
         List <MemberProjectedSlot> slots = MemberProjectedSlot.GetSlots((IEnumerable <MemberProjectedSlot>) this.m_slots, key.KeyFields);
         if (slots != null)
         {
             BasicKeyConstraint constraint = new BasicKeyConstraint(this, (IEnumerable <MemberProjectedSlot>)slots);
             constraints.Add(constraint);
         }
     }
 }