protected override Expression VisitEnumDefinition(SqlEnumDefinitionExpression expression)
        {
            SqlEnumDefinitionExpression current;
            if (!TryGetCurrent(expression, out current))
            {
                return expression;
            }

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

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

            this.currentObject = current.Labels;
            this.VisitObjectList(expression.Labels);
            if (!this.result)
            {
                return expression;
            }

            this.currentObject = current;
            return expression;
        }
Exemplo n.º 2
0
        protected override Expression VisitEnumDefinition(SqlEnumDefinitionExpression expression)
        {
            this.Write("ENUM (");
            this.WriteDeliminatedListOfItems(expression.Labels, this.WriteQuotedString);
            this.Write(")");

            return expression;
        }
        private Expression BuildCreateEnumTypeExpression(EnumTypeDescriptor enumTypeDescriptor)
        {
            var sqlTypeExpression = new SqlTypeExpression(enumTypeDescriptor.Name);
            var asExpression = new SqlEnumDefinitionExpression(enumTypeDescriptor.GetValues());

            return new SqlCreateTypeExpression(sqlTypeExpression, asExpression, true);
        }
Exemplo n.º 4
0
		protected virtual Expression VisitEnumDefinition(SqlEnumDefinitionExpression expression)
		{
			return expression;
		}
Exemplo n.º 5
0
 protected virtual Expression VisitEnumDefinition(SqlEnumDefinitionExpression expression)
 {
     return(expression);
 }