protected override Expression VisitForeignKeyConstraint(SqlForeignKeyConstraintExpression foreignKeyConstraintExpression)
        {
            var action = new SqlConstraintActionExpression(SqlConstraintActionType.Add, foreignKeyConstraintExpression);
            var ammendmentEpression = new SqlAlterTableExpression(currentTable.Table, action);

            ammendments.Add(ammendmentEpression);

            return null;
        }
Beispiel #2
0
 protected override Expression VisitConstraintAction(SqlConstraintActionExpression expression)
 {
     this.hashCode ^= expression.ActionType.GetHashCode();
     return(base.VisitConstraintAction(expression));
 }
 protected override Expression VisitConstraintAction(SqlConstraintActionExpression expression)
 {
     this.hashCode ^= expression.ActionType.GetHashCode();
     return base.VisitConstraintAction(expression);
 }
        protected override Expression VisitConstraintAction(SqlConstraintActionExpression expression)
        {
            SqlConstraintActionExpression current;
            if (!TryGetCurrent(expression, out current))
            {
                return expression;
            }

            if (!(this.result &= current.ActionType == expression.ActionType))
            {
                return expression;
            }

            if (!(this.result &= current.NodeType == expression.NodeType))
            {
                return expression;
            }

            if (!(this.result &= current.Type == expression.Type))
            {
                return expression;
            }

            this.currentObject = current.ConstraintExpression;
            this.Visit(expression.ConstraintExpression);
            if (!this.result)
            {
                return expression;
            }

            this.currentObject = current;
            return expression;
        }
Beispiel #5
0
        protected override Expression VisitConstraintAction(SqlConstraintActionExpression actionExpression)
        {
            this.Write(actionExpression.ActionType.ToString().ToUpper());
            this.Write(" ");
            this.Visit(actionExpression.ConstraintExpression);

            return actionExpression;
        }
		protected virtual Expression VisitConstraintAction(SqlConstraintActionExpression actionExpression)
		{
			return actionExpression;
		}
 protected virtual Expression VisitConstraintAction(SqlConstraintActionExpression actionExpression)
 {
     return(actionExpression);
 }