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

db.sql.api.cmd.executor.method.groupByMethod.IGroupByGetterMethod Maven / Gradle / Ivy

There is a newer version: 1.7.6-RC2
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy