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

db.sql.api.impl.cmd.basic.Condition Maven / Gradle / Ivy

There is a newer version: 1.7.6-RC2
Show newest version
package db.sql.api.impl.cmd.basic;

import db.sql.api.Cmd;
import db.sql.api.cmd.basic.ICondition;
import db.sql.api.impl.cmd.Methods;
import db.sql.api.impl.cmd.dbFun.Case;
import db.sql.api.impl.cmd.dbFun.If;

import java.io.Serializable;

public interface Condition extends ICondition, Cmd {
    char[] getOperator();

    Field getField();

    Value getValue();

    default If if_(Cmd value, Cmd value2) {
        return new If(this, value, value2);
    }

    default If if_(Cmd value, Serializable value2) {
        return new If(this, value, Methods.cmd(value2));
    }

    default If if_(Serializable value, Serializable value2) {
        return new If(this, value, value2);
    }

    default Case caseThen(Serializable value) {
        return this.caseThen(Methods.cmd(value));
    }

    default Case caseThen(Cmd value) {
        return new Case().when(this, value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy