db.sql.api.cmd.executor.method.groupByMethod.IGroupByMethods 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.IDataset;
import db.sql.api.cmd.basic.IDatasetField;
import db.sql.api.cmd.basic.ITable;
import db.sql.api.cmd.basic.ITableField;
import java.util.function.Function;
public interface IGroupByMethods,
TABLE_FIELD extends ITableField,
COLUMN extends Cmd>
extends
IGroupByCmdMethod,
IGroupByGetterMethod,
IGroupByMultiGetterMethod,
IGroupByDatasetMethod,
IGroupByDatasetGetterMethod,
IGroupByDatasetMultiGetterMethod {
@Override
default , DATASET_FIELD extends IDatasetField> SELF groupBy(IDataset dataset, Getter... columns) {
for (Getter column : columns) {
this.groupBy(dataset, column);
}
return (SELF) this;
}
SELF groupBy(String columnName);
SELF groupBy(String columnName, Function f);
default SELF groupBy(boolean when, String columnName) {
if (!when) {
return (SELF) this;
}
return this.groupBy(columnName);
}
default SELF groupBy(boolean when, String columnName, Function f) {
if (!when) {
return (SELF) this;
}
return this.groupBy(columnName, f);
}
}