Search in sources :

Example 1 with ColumnExpression

use of com.ctrip.platform.dal.dao.sqlbuilder.Expressions.ColumnExpression in project dal by ctripcorp.

the class AbstractFreeSqlBuilder method ignoreNull.

/**
 * Ignore last expression if iy's value is null.
 *
 * @param value
 * @return
 */
public AbstractFreeSqlBuilder ignoreNull() {
    Expression last = getLastExpression();
    if (!(last instanceof ColumnExpression))
        throw new IllegalStateException("The last sql segement is not an ColumnExpression.");
    ((ColumnExpression) last).ignoreNull();
    return this;
}
Also used : Expression(com.ctrip.platform.dal.dao.sqlbuilder.Expressions.Expression) ColumnExpression(com.ctrip.platform.dal.dao.sqlbuilder.Expressions.ColumnExpression) ColumnExpression(com.ctrip.platform.dal.dao.sqlbuilder.Expressions.ColumnExpression)

Aggregations

ColumnExpression (com.ctrip.platform.dal.dao.sqlbuilder.Expressions.ColumnExpression)1 Expression (com.ctrip.platform.dal.dao.sqlbuilder.Expressions.Expression)1