Inheritance: SqlExpression
Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="expression"></param>
        /// <returns></returns>
        public virtual SqlExpression VisitTuple(SqlTupleExpression expression)
        {
            var list = expression.Expressions;

            if (list != null)
            {
                list = VisitExpressionList(list);
            }

            return(SqlExpression.Tuple(list));
        }
Exemplo n.º 2
0
        public override SqlExpression VisitTuple(SqlTupleExpression expression)
        {
            builder.Append("(");

            var sz = expression.Expressions.Length;

            for (int i = 0; i < sz; i++)
            {
                Visit(expression.Expressions[i]);
                if (i < sz - 1)
                {
                    builder.Append(", ");
                }
            }

            builder.Append(")");
            return(expression);
        }
Exemplo n.º 3
0
        public override SqlExpression VisitTuple(SqlTupleExpression expression)
        {
            var list = expression.Expressions;

            if (list != null)
            {
                list = VisitExpressionList(list);
            }

            if (list == null)
            {
                return(SqlExpression.Constant(new DataObject(new ArrayType(-1), SqlArray.Null)));
            }

            // This is not an array, but a subquery
            if (list.Length == 1 &&
                list[0].ExpressionType == SqlExpressionType.Constant &&
                ((SqlConstantExpression)list[0]).Value.Type is QueryType)
            {
                return(list[0]);
            }

            return(SqlExpression.Constant(new DataObject(new ArrayType(list.Length), new SqlArray(list))));
        }
Exemplo n.º 4
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="expression"></param>
        /// <returns></returns>
        public virtual SqlExpression VisitTuple(SqlTupleExpression expression)
        {
            var list = expression.Expressions;
            if (list != null)
                list = VisitExpressionList(list);

            return SqlExpression.Tuple(list);
        }
        public override SqlExpression VisitTuple(SqlTupleExpression expression)
        {
            var list = expression.Expressions;
            if (list != null) {
                list = VisitExpressionList(list);
            }

            if (list == null)
                return SqlExpression.Constant(new DataObject(new ArrayType(-1), SqlArray.Null));

            // This is not an array, but a subquery
            if (list.Length == 1 &&
                list[0].ExpressionType == SqlExpressionType.Constant &&
                ((SqlConstantExpression)list[0]).Value.Type is QueryType)
                return list[0];

            return SqlExpression.Constant(new DataObject(new ArrayType(list.Length), new SqlArray(list)));
        }
        public override SqlExpression VisitTuple(SqlTupleExpression expression)
        {
            builder.Append("(");

            var sz = expression.Expressions.Length;
            for (int i = 0; i < sz; i++) {
                Visit(expression.Expressions[i]);
                if (i < sz - 1)
                    builder.Append(", ");
            }

            builder.Append(")");
            return expression;
        }
        public override SqlExpression VisitTuple(SqlTupleExpression expression)
        {
            var list = expression.Expressions;
            if (list != null) {
                list = VisitExpressionList(list);
            }

            if (list == null)
                return SqlExpression.Constant(new DataObject(new ArrayType(-1), SqlArray.Null));

            return SqlExpression.Constant(new DataObject(new ArrayType(list.Length), new SqlArray(list)));
        }