All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.n3r.eql.parser.IffPart Maven / Gradle / Ivy

There is a newer version: 0.1.19
Show newest version
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) : "";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy