db.sql.api.cmd.executor.method.groupByMethod.IGroupByGetterMethod Maven / Gradle / Ivy
package db.sql.api.cmd.executor.method.groupByMethod;
import db.sql.api.Cmd;
import db.sql.api.Getter;
import db.sql.api.cmd.basic.ITable;
import db.sql.api.cmd.basic.ITableField;
import java.util.function.Function;
public interface IGroupByGetterMethod, TABLE_FIELD extends ITableField> {
default SELF groupBy(Getter column) {
return this.groupBy(column, 1);
}
default SELF groupBy(Getter column, int storey) {
return this.groupBy(column, storey, null);
}
default SELF groupBy(boolean when, Getter column) {
if (!when) {
return (SELF) this;
}
return this.groupBy(column, 1);
}
default SELF groupBy(boolean when, Getter column, int storey) {
if (!when) {
return (SELF) this;
}
return this.groupBy(column, storey);
}
//---
default SELF groupBy(Getter column, Function f) {
return this.groupBy(column, 1, f);
}
SELF groupBy(Getter column, int storey, Function f);
default SELF groupBy(boolean when, Getter column, Function f) {
if (!when) {
return (SELF) this;
}
return this.groupBy(column, 1, f);
}
default SELF groupBy(boolean when, Getter column, int storey, Function f) {
if (!when) {
return (SELF) this;
}
return this.groupBy(column, storey, f);
}
}