Exemplo n.º 1
0
        public override void EnterEntityKeyUnique([NotNull] KayleeParser.EntityKeyUniqueContext context)
        {
            var identifierList = context.identifierList();
            var identifiers    = identifierList.IDENTIFIER();
            var uniqueKey      = new UniqueKey(Entity);

            foreach (var identifier in identifiers)
            {
                var fieldReference = new FieldReference
                {
                    SchemaName = Entity.Schema.Name,
                    FieldName  = identifier.GetText()
                };
                fieldReference.EntityPath.AddRange(Entity.Path);
                uniqueKey.FieldReferences.Add(fieldReference);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Exit a parse tree produced by <see cref="KayleeParser.entityKeyUnique"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitEntityKeyUnique([NotNull] KayleeParser.EntityKeyUniqueContext context)
 {
 }