Inheritance: IExpressionBuilder
        public static ISelectOrderBuilder Expression(this ISelectOrderBuilder builder, Action<IExpressionBuilder> expression)
        {
            var expBuilder = new ExpressionBuilder();
            expression(expBuilder);

            return builder.Expression(expBuilder.Build());
        }
        public static IColumnBuilder WithDefault(this IColumnBuilder builder, Action<IExpressionBuilder> expression)
        {
            var expBuilder = new ExpressionBuilder();
            expression(expBuilder);

            return builder.WithDefault(expBuilder.Build());
        }
        public static IQueryExpressionItemBuilder Expression(this IQueryExpressionItemBuilder builder,
			Action<IExpressionBuilder> expression)
        {
            var expBuilder = new ExpressionBuilder();
            expression(expBuilder);

            return builder.Expression(expBuilder.Build());
        }
 public static IExpressionBuilder Function(this IExpressionBuilder builder, ObjectName functionName, params Action<IExpressionBuilder>[] args)
 {
     return builder.Function(functionName, args.Select(x => {
         var expBuilder = new ExpressionBuilder();
         x(expBuilder);
         return expBuilder.Build();
     }).ToArray());
 }
Beispiel #5
0
        public IExpressionBuilder Quantified(SqlExpressionType quantifyType, Action<IExpressionBuilder> exp)
        {
            var builder = new ExpressionBuilder();
            exp(builder);

            expression = SqlExpression.Quantified(quantifyType, builder.Build());

            return this;
        }
Beispiel #6
0
        public IExpressionBuilder Binary(SqlExpressionType binaryType, Action<IExpressionBuilder> right)
        {
            if (expression == null)
                throw new InvalidOperationException();

            var builder = new ExpressionBuilder();
            right(builder);

            expression = SqlExpression.Binary(expression, binaryType, builder.Build());

            VerifyUnary();

            return this;
        }
        public static IQueryExpressionBuilder GroupBy(this IQueryExpressionBuilder builder, params Action<IExpressionBuilder>[] groupBy)
        {
            var expressions = new List<SqlExpression>();
            foreach (var action in groupBy) {
                var expBuilder = new ExpressionBuilder();
                action(expBuilder);

                expressions.Add(expBuilder.Build());
            }

            return builder.GroupBy(expressions.ToArray());
        }