org.n3r.eql.parser.IffPart Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eql Show documentation
Show all versions of eql Show documentation
a simple wrapper framework for jdbc to seperate sql and java code
package org.n3r.eql.parser;
import lombok.Value;
import org.n3r.eql.base.ExpressionEvaluator;
import org.n3r.eql.map.EqlRun;
@Value
public class IffPart implements EqlPart {
private final String expr;
private final LiteralPart part;
@Override
public String evalSql(EqlRun eqlRun) {
ExpressionEvaluator evaluator = eqlRun.getEqlConfig().getExpressionEvaluator();
return evaluator.evalBool(expr, eqlRun) ? part.evalSql(eqlRun) : "";
}
}