コード例 #1
0
        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;
        }
コード例 #2
0
ファイル: Sql92QueryFormatter.cs プロジェクト: ciker/Shaolinq
        protected override Expression VisitEnumDefinition(SqlEnumDefinitionExpression expression)
        {
            this.Write("ENUM (");
            this.WriteDeliminatedListOfItems(expression.Labels, this.WriteQuotedString);
            this.Write(")");

            return expression;
        }
コード例 #3
0
        private Expression BuildCreateEnumTypeExpression(EnumTypeDescriptor enumTypeDescriptor)
        {
            var sqlTypeExpression = new SqlTypeExpression(enumTypeDescriptor.Name);
            var asExpression = new SqlEnumDefinitionExpression(enumTypeDescriptor.GetValues());

            return new SqlCreateTypeExpression(sqlTypeExpression, asExpression, true);
        }
コード例 #4
0
		protected virtual Expression VisitEnumDefinition(SqlEnumDefinitionExpression expression)
		{
			return expression;
		}
コード例 #5
0
 protected virtual Expression VisitEnumDefinition(SqlEnumDefinitionExpression expression)
 {
     return(expression);
 }