Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
db.sql.api.cmd.executor.IQuery Maven / Gradle / Ivy
package db.sql.api.cmd.executor;
import db.sql.api.Cmd;
import db.sql.api.Getter;
import db.sql.api.cmd.ICmdFactory;
import db.sql.api.cmd.JoinMode;
import db.sql.api.cmd.basic.*;
import db.sql.api.cmd.executor.method.*;
import db.sql.api.cmd.struct.*;
import db.sql.api.cmd.struct.conditionChain.IConditionChain;
import db.sql.api.cmd.struct.query.*;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
public interface IQuery
, TABLE_FIELD extends ITableField
, COLUMN extends Cmd,
V,
CMD_FACTORY extends ICmdFactory,
CONDITION_CHAIN extends IConditionChain,
WITH extends IWith,
SELECT extends ISelect,
FROM extends IFrom,
JOIN extends IJoin,
ON extends IOn,
JOINS extends Joins,
WHERE extends IWhere,
GROUPBY extends IGroupBy,
HAVING extends IHaving,
ORDERBY extends IOrderBy,
LIMIT extends ILimit,
FORUPDATE extends IForUpdate,
IUNION extends IUnion
>
extends IWithMethod,
ISelectMethod,
IFromMethod,
IJoinMethod,
IWhereMethod,
IGroupByMethod,
IHavingMethod,
IOrderByMethod,
ILimitMethod,
IForUpdateMethod,
IUnionMethod,
IExecutor {
CMD_FACTORY $();
WITH $with(IWithQuery withQuery);
SELECT $select();
, DATASET_FIELD extends IDatasetField> FROM $from(IDataset... tables);
, DATASET_FIELD extends IDatasetField> JOIN $join(JoinMode mode, DATASET mainTable, DATASET secondTable);
WHERE $where();
GROUPBY $groupBy();
HAVING $having();
ORDERBY $orderBy();
LIMIT $limit();
FORUPDATE $forUpdate();
SELF fetchFilter(Getter getter, Consumer where);
@Override
default SELF with(IWithQuery... withQuerys) {
for (IWithQuery withQuery : withQuerys) {
$with(withQuery);
}
return (SELF) this;
}
@Override
default SELF select(Cmd column) {
$select().select(column);
return (SELF) this;
}
@Override
default SELF select(Class entity, int storey) {
return this.select($().allField($().table(entity, storey)));
}
@Override
default SELF selectDistinct() {
$select().distinct();
return (SELF) this;
}
@Override
default SELF selectIgnore(Getter column, int storey) {
this.$select().selectIgnore($().field(column, storey));
return (SELF) this;
}
@Override
default , DATASET_FIELD extends IDatasetField> SELF from(IDataset... tables) {
$from(tables);
return (SELF) this;
}
default SELF join(Class mainTable, Class secondTable, BiConsumer consumer) {
return this.join(JoinMode.INNER, mainTable, secondTable, consumer);
}
default SELF join(JoinMode mode, Class mainTable, Class secondTable, BiConsumer consumer) {
return this.join(mode, mainTable, 1, secondTable, 1, consumer);
}
SELF join(JoinMode mode, Class mainTable, int mainTableStorey, Class secondTable, int secondTableStorey, BiConsumer consumer);
default SELF where(Consumer whereConsumer) {
whereConsumer.accept($where());
return (SELF) this;
}
@Override
default SELF groupBy(COLUMN column) {
$groupBy().groupBy(column);
return (SELF) this;
}
@Override
default SELF groupBy(COLUMN... columns) {
$groupBy().groupBy(columns);
return (SELF) this;
}
@Override
default SELF groupBy(List columns) {
$groupBy().groupBy(columns);
return (SELF) this;
}
@Override
default SELF having(Consumer consumer) {
consumer.accept($having());
return (SELF) this;
}
@Override
default SELF havingAnd(ICondition condition) {
$having().and(condition);
return (SELF) this;
}
@Override
default SELF havingOr(ICondition condition) {
$having().or(condition);
return (SELF) this;
}
@Override
default SELF orderBy(IOrderByDirection orderByDirection, Cmd column) {
$orderBy().orderBy(orderByDirection, column);
return (SELF) this;
}
@Override
default SELF limit(int limit) {
return this.limit(0, limit);
}
@Override
default SELF limit(int offset, int limit) {
$limit().set(offset, limit);
return (SELF) this;
}
@Override
default SELF forUpdate(boolean wait) {
$forUpdate().setWait(wait);
return (SELF) this;
}
SELECT getSelect();
WHERE getWhere();
FROM getFrom();
JOINS getJoins();
GROUPBY getGroupBy();
ORDERBY getOrderBy();
LIMIT getLimit();
FORUPDATE getForUpdate();
Unions getUnions();
@Override
default CONDITION_CHAIN conditionChain() {
return $where().conditionChain();
}
Map> getFetchFilters();
}