db.sql.api.cmd.executor.method.groupByMethod.IGroupByDatasetMethod Maven / Gradle / Ivy
package db.sql.api.cmd.executor.method.groupByMethod;
import db.sql.api.Cmd;
import db.sql.api.cmd.basic.IDataset;
import db.sql.api.cmd.basic.IDatasetField;
import java.util.function.Function;
public interface IGroupByDatasetMethod {
default , DATASET_FIELD extends IDatasetField> SELF groupBy(IDataset dataset, String columnName) {
return this.groupBy(dataset, columnName, null);
}
default , DATASET_FIELD extends IDatasetField> SELF groupBy(boolean when, IDataset dataset, String columnName) {
if (!when) {
return (SELF) this;
}
return this.groupBy(dataset, columnName);
}
//---
, DATASET_FIELD extends IDatasetField> SELF groupBy(IDataset dataset, String columnName, Function f);
default , DATASET_FIELD extends IDatasetField> SELF groupBy(boolean when, IDataset dataset, String columnName, Function f) {
if (!when) {
return (SELF) this;
}
return this.groupBy(dataset, columnName, f);
}
}