Create an object with the given conditions and default value. An expression can be provided to test each condition against, instead of having all conditions represent their own boolean expression.

Extends Instance Properties
PropertyTypeDefault ValueDescription
conditions

the conditions of the patio.sql.CaseExpression.

def

the default value of the patio.sql.CaseExpression.

expression

the expression of the patio.sql.CaseExpression.

hasExpressionBoolean

returns true if this case expression has a expression

noExpressionBoolean

true if this patio.sql.CaseExpression's expression is undefined.

Constructor

Defined sql.js Source
function (conditions,def,expression){
   if (Expression.isConditionSpecifier(conditions)) {
       this.conditions = toArray(conditions);
       this.def = def;
       this.expression = expression;
       this.noExpression = isUndefined(expression);
   }
           
}
            

toString Function Public


Defined sql.js

Converts the case expression to a string

Arguments Returns Source
function (ds){
   !Dataset && (Dataset = require("./dataset"));
   ds = ds || new Dataset();
   return ds.caseExpressionSql(this);
           
}
    

Documentation generated using coddoc.