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

db.sql.api.cmd.executor.method.selectMethod.ISelectMethods Maven / Gradle / Ivy

There is a newer version: 1.7.6-RC2
Show newest version
package db.sql.api.cmd.executor.method.selectMethod;


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 ISelectMethods, TABLE_FIELD extends ITableField,
        COLUMN extends Cmd>
        extends
        ISelectCmdMethod,
        ISelectGetterMethod,
        ISelectMultiGetterMethod,

        ISelectDatasetMethod,
        ISelectDatasetGetterMethod,
        ISelectDatasetMultiGetterMethod {

    @Override
    default , DATASET_FIELD extends IDatasetField> SELF select(IDataset dataset, Getter... columns) {
        for (Getter column : columns) {
            this.select(dataset, column);
        }
        return (SELF) this;
    }

    SELF select(String columnName);

    SELF select(String columnName, Function f);

    default SELF select(boolean when, String columnName) {
        if (!when) {
            return (SELF) this;
        }
        return this.select(columnName);
    }

    default SELF select(boolean when, String columnName, Function f) {
        if (!when) {
            return (SELF) this;
        }
        return this.select(columnName, f);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy