db.sql.api.impl.cmd.basic.Condition Maven / Gradle / Ivy
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);
}
}