Exemple #1
0
        public CaseBuilder <TCaseFunction, T> When(DbBool when, T then)
        {
            caseFunction.Add(when, then);

            return(this);
        }
Exemple #2
0
        public static IWrapper <TWrapper> Having <TWrapper>(this IWrapper <TWrapper> command, DbBool condition)
            where TWrapper : IWrapper <HavingClause>
        {
            Check.IsNotNull(command, nameof(command));
            Check.IsNotNull(condition, nameof(condition));

            command.Value.Value.Condition = condition;

            return(command);
        }
 public static DbBool Average(this DbFunctions dbFunctions, DbBool value)
 {
     return(new DbBoolFunctionValue("avg", new[] { value }));
 }
 public static DbBool Sum(this DbFunctions dbFunctions, DbBool value)
 {
     return(new DbBoolFunctionValue("sum", new[] { value }));
 }
 public static DbBool Coalesce(this DbFunctions dbFunctions, DbBool value, params IDbFragment[] other)
 {
     return(new DbBoolFunctionValue("coalesce", new[] { value }.Concat(other)));
 }
 public static DbBool Max(this DbFunctions dbFunctions, DbBool value)
 {
     return(new DbBoolFunctionValue("max", new[] { value }));
 }
 public static DbBool IIf(this DbFunctions dbFunctions, DbBool condition, DbBool trueValue, DbBool falseValue)
 => new DbBoolFunctionValue("iif", new IDbFragment[] { condition, trueValue, falseValue });