类 MutableRootQueryImpl<T extends Table<?>>
java.lang.Object
org.babyfish.jimmer.sql.ast.impl.AbstractMutableStatementImpl
org.babyfish.jimmer.sql.ast.impl.query.AbstractMutableQueryImpl
org.babyfish.jimmer.sql.ast.impl.query.MutableRootQueryImpl<T>
- 所有已实现的接口:
FilterableImplementor,MutableStatementImplementor,Filterable,MutableQuery,MutableRootQuery<T>,RootSelectable<T>,Sortable,SubQueryProvider
public class MutableRootQueryImpl<T extends Table<?>>
extends AbstractMutableQueryImpl
implements MutableRootQuery<T>
-
字段概要
从类继承的字段 org.babyfish.jimmer.sql.ast.impl.query.AbstractMutableQueryImpl
ORDER_BY_PRIORITY_GLOBAL_FILTER, ORDER_BY_PRIORITY_PROP_FILTER, ORDER_BY_PRIORITY_STATEMENT -
构造器概要
构造器构造器说明MutableRootQueryImpl(StatementContext ctx, JSqlClientImplementor sqlClient, org.babyfish.jimmer.meta.ImmutableType immutableType) MutableRootQueryImpl(StatementContext ctx, JSqlClientImplementor sqlClient, TableProxy<?> table) MutableRootQueryImpl(JSqlClientImplementor sqlClient, org.babyfish.jimmer.meta.ImmutableType immutableType, ExecutionPurpose purpose, FilterLevel filterLevel) MutableRootQueryImpl(JSqlClientImplementor sqlClient, TableProxy<?> table, ExecutionPurpose purpose, FilterLevel filterLevel) -
方法概要
修饰符和类型方法说明booleanexists(Connection con) groupBy(Expression<?>... expressions) orderBy(Expression<?>... expressions) orderByIf(boolean condition, Expression<?>... expressions) <R> ConfigurableRootQuery<T, R> <T1,T2> ConfigurableRootQuery <T, org.babyfish.jimmer.sql.ast.tuple.Tuple2<T1, T2>> <T1,T2, T3>
ConfigurableRootQuery<T, org.babyfish.jimmer.sql.ast.tuple.Tuple3<T1, T2, T3>> <T1,T2, T3, T4>
ConfigurableRootQuery<T, org.babyfish.jimmer.sql.ast.tuple.Tuple4<T1, T2, T3, T4>> select(Selection<T1> selection1, Selection<T2> selection2, Selection<T3> selection3, Selection<T4> selection4) <T1,T2, T3, T4, T5>
ConfigurableRootQuery<T, org.babyfish.jimmer.sql.ast.tuple.Tuple5<T1, T2, T3, T4, T5>> select(Selection<T1> selection1, Selection<T2> selection2, Selection<T3> selection3, Selection<T4> selection4, Selection<T5> selection5) <T1,T2, T3, T4, T5, T6>
ConfigurableRootQuery<T, org.babyfish.jimmer.sql.ast.tuple.Tuple6<T1, T2, T3, T4, T5, T6>> select(Selection<T1> selection1, Selection<T2> selection2, Selection<T3> selection3, Selection<T4> selection4, Selection<T5> selection5, Selection<T6> selection6) <T1,T2, T3, T4, T5, T6, T7>
ConfigurableRootQuery<T, org.babyfish.jimmer.sql.ast.tuple.Tuple7<T1, T2, T3, T4, T5, T6, T7>> select(Selection<T1> selection1, Selection<T2> selection2, Selection<T3> selection3, Selection<T4> selection4, Selection<T5> selection5, Selection<T6> selection6, Selection<T7> selection7) <T1,T2, T3, T4, T5, T6, T7, T8>
ConfigurableRootQuery<T, org.babyfish.jimmer.sql.ast.tuple.Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>> select(Selection<T1> selection1, Selection<T2> selection2, Selection<T3> selection3, Selection<T4> selection4, Selection<T5> selection5, Selection<T6> selection6, Selection<T7> selection7, Selection<T8> selection8) <T1,T2, T3, T4, T5, T6, T7, T8, T9>
ConfigurableRootQuery<T, org.babyfish.jimmer.sql.ast.tuple.Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>> select(Selection<T1> selection1, Selection<T2> selection2, Selection<T3> selection3, Selection<T4> selection4, Selection<T5> selection5, Selection<T6> selection6, Selection<T7> selection7, Selection<T8> selection8, Selection<T9> selection9) where(org.babyfish.jimmer.Specification<?> specification) Add some predicates(logical and)where(JSpecification<?, T> specification) Avoid using this method whenever possible, usingDynamic Predicatesare a more convenient approach.已过时。从类继承的方法 org.babyfish.jimmer.sql.ast.impl.query.AbstractMutableQueryImpl
getAcceptedOrderByPriority, getGroupExpressions, getHavingPredicate, getHavingPredicates, getOrders, isGroupByClauseUsed, onFrozen, setHavingPredicates, setOrderByPriority从类继承的方法 org.babyfish.jimmer.sql.ast.impl.AbstractMutableStatementImpl
applyDataLoaderGlobalFilters, applyGlobalFilters, applyVirtualPredicates, createAssociationSubQuery, createSubQuery, freeze, getFilterPredicate, getPredicate, getPredicates, getPurpose, getSqlClient, getTable, getTableImplementor, getType, hasVirtualPredicate, isFrozen, mergePredicates, modCount, modify, resolveVirtualPredicate, unfrozenPredicates, validateMutable, whereByFilter从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.babyfish.jimmer.sql.ast.impl.query.FilterableImplementor
createAssociationSubQuery, createAssociationWildSubQuery, createSubQuery, createWildSubQuery从接口继承的方法 org.babyfish.jimmer.sql.ast.query.MutableRootQuery
exists从接口继承的方法 org.babyfish.jimmer.sql.ast.query.selectable.RootSelectable
selectCount
-
构造器详细资料
-
MutableRootQueryImpl
public MutableRootQueryImpl(JSqlClientImplementor sqlClient, org.babyfish.jimmer.meta.ImmutableType immutableType, ExecutionPurpose purpose, FilterLevel filterLevel) -
MutableRootQueryImpl
public MutableRootQueryImpl(JSqlClientImplementor sqlClient, TableProxy<?> table, ExecutionPurpose purpose, FilterLevel filterLevel) -
MutableRootQueryImpl
public MutableRootQueryImpl(StatementContext ctx, JSqlClientImplementor sqlClient, org.babyfish.jimmer.meta.ImmutableType immutableType) -
MutableRootQueryImpl
public MutableRootQueryImpl(StatementContext ctx, JSqlClientImplementor sqlClient, TableProxy<?> table)
-
-
方法详细资料
-
getParent
- 指定者:
getParent在类中AbstractMutableStatementImpl
-
getContext
- 指定者:
getContext在类中AbstractMutableStatementImpl
-
select
- 指定者:
select在接口中RootSelectable<T extends Table<?>>
-
select
public <T1,T2> ConfigurableRootQuery<T,org.babyfish.jimmer.sql.ast.tuple.Tuple2<T1, selectT2>> (Selection<T1> selection1, Selection<T2> selection2) - 指定者:
select在接口中RootSelectable<T extends Table<?>>
-
select
public <T1,T2, ConfigurableRootQuery<T,T3> org.babyfish.jimmer.sql.ast.tuple.Tuple3<T1, selectT2, T3>> (Selection<T1> selection1, Selection<T2> selection2, Selection<T3> selection3) - 指定者:
select在接口中RootSelectable<T extends Table<?>>
-
select
public <T1,T2, ConfigurableRootQuery<T,T3, T4> org.babyfish.jimmer.sql.ast.tuple.Tuple4<T1, selectT2, T3, T4>> (Selection<T1> selection1, Selection<T2> selection2, Selection<T3> selection3, Selection<T4> selection4) - 指定者:
select在接口中RootSelectable<T extends Table<?>>
-
select
public <T1,T2, ConfigurableRootQuery<T,T3, T4, T5> org.babyfish.jimmer.sql.ast.tuple.Tuple5<T1, selectT2, T3, T4, T5>> (Selection<T1> selection1, Selection<T2> selection2, Selection<T3> selection3, Selection<T4> selection4, Selection<T5> selection5) - 指定者:
select在接口中RootSelectable<T extends Table<?>>
-
select
public <T1,T2, ConfigurableRootQuery<T,T3, T4, T5, T6> org.babyfish.jimmer.sql.ast.tuple.Tuple6<T1, selectT2, T3, T4, T5, T6>> (Selection<T1> selection1, Selection<T2> selection2, Selection<T3> selection3, Selection<T4> selection4, Selection<T5> selection5, Selection<T6> selection6) - 指定者:
select在接口中RootSelectable<T extends Table<?>>
-
select
public <T1,T2, ConfigurableRootQuery<T,T3, T4, T5, T6, T7> org.babyfish.jimmer.sql.ast.tuple.Tuple7<T1, selectT2, T3, T4, T5, T6, T7>> (Selection<T1> selection1, Selection<T2> selection2, Selection<T3> selection3, Selection<T4> selection4, Selection<T5> selection5, Selection<T6> selection6, Selection<T7> selection7) - 指定者:
select在接口中RootSelectable<T extends Table<?>>
-
select
public <T1,T2, ConfigurableRootQuery<T,T3, T4, T5, T6, T7, T8> org.babyfish.jimmer.sql.ast.tuple.Tuple8<T1, selectT2, T3, T4, T5, T6, T7, T8>> (Selection<T1> selection1, Selection<T2> selection2, Selection<T3> selection3, Selection<T4> selection4, Selection<T5> selection5, Selection<T6> selection6, Selection<T7> selection7, Selection<T8> selection8) - 指定者:
select在接口中RootSelectable<T extends Table<?>>
-
select
public <T1,T2, ConfigurableRootQuery<T,T3, T4, T5, T6, T7, T8, T9> org.babyfish.jimmer.sql.ast.tuple.Tuple9<T1, selectT2, T3, T4, T5, T6, T7, T8, T9>> (Selection<T1> selection1, Selection<T2> selection2, Selection<T3> selection3, Selection<T4> selection4, Selection<T5> selection5, Selection<T6> selection6, Selection<T7> selection7, Selection<T8> selection8, Selection<T9> selection9) - 指定者:
select在接口中RootSelectable<T extends Table<?>>
-
where
从接口复制的说明:FilterableAdd some predicates(logical and)- 指定者:
where在接口中Filterable- 指定者:
where在接口中MutableRootQuery<T extends Table<?>>- 指定者:
where在接口中Sortable- 覆盖:
where在类中AbstractMutableQueryImpl- 参数:
predicates- Predicates, everything one can be null- 返回:
- Return the current object to support chain programming style
-
where
- 指定者:
where在接口中MutableRootQuery<T extends Table<?>>
-
where
- 指定者:
where在接口中MutableRootQuery<T extends Table<?>>
-
whereIf
@OldChain @Deprecated public MutableRootQueryImpl<T> whereIf(boolean condition, Predicate predicate) 已过时。This method is deprecated, usingDynamic Predicatesis a more convenient approach.Please look at this example:
WhenwhereIf(name != null, table.name().eq(name))nameis null, this code works becauseeq(null)is automatically translated by Jimmer toisNull(), which doesn't cause an exception.Let's look at another example:
Except RUST marco, almost all programming languages calculate all parameters first and then call the function. Therefore, beforewhereIf(minPrice != null, table.price().ge(minPrice))whereIfis executed,ge(null)already causes an exception.For this reason,
whereIfprovides an overloaded form with a lambda parameter:
Although this overloaded form can solve this problem, it ultimately adds a mental burden during development.whereIf(minPrice != null, () -> table.price().ge(minPrice))Therefore, Jimmer provides
Dynamic Predicates- Java: eqIf, neIf, ltIf, leIf, gtIf, geIf, likeIf, ilikeIf, betweenIf
- Kotlin: eq?, ne?, lt?, le?, gt?, ge?, like?, ilike?, betweenIf?
geIfas an example, this functionality is ultimately implemented like this.where(table.price().geIf(minPrice))- 指定者:
whereIf在接口中Filterable- 指定者:
whereIf在接口中MutableRootQuery<T extends Table<?>>- 指定者:
whereIf在接口中Sortable- 覆盖:
whereIf在类中AbstractMutableQueryImpl
-
whereIf
从接口复制的说明:FilterableAvoid using this method whenever possible, usingDynamic Predicatesare a more convenient approach.Please look at this example:
WhenwhereIf(name != null, table.name().eq(name))nameis null, this code works becauseeq(null)is automatically translated by Jimmer toisNull(), which doesn't cause an exception.Let's look at another example:
Except RUST marco, almost all programming languages calculate all parameters first and then call the function. Therefore, beforewhereIf(minPrice != null, table.price().ge(minPrice))whereIfis executed,ge(null)already causes an exception.For this reason,
whereIfprovides an overloaded form with a lambda parameter:
Although this overloaded form can solve this problem, it ultimately adds a mental burden during development.whereIf(minPrice != null, () -> table.price().ge(minPrice))Therefore, Jimmer provides
Dynamic Predicate- Java: eqIf, neIf, ltIf, leIf, gtIf, geIf, likeIf, ilikeIf, betweenIf
- Kotlin: eq?, ne?, lt?, le?, gt?, ge?, like?, ilike?, betweenIf?
geIfas an example, this functionality is ultimately implemented like this.where(table.price().geIf(minPrice))- 指定者:
whereIf在接口中Filterable- 指定者:
whereIf在接口中MutableRootQuery<T extends Table<?>>- 指定者:
whereIf在接口中Sortable- 覆盖:
whereIf在类中AbstractMutableQueryImpl- 参数:
condition- The conditionblock- A lambda to create predicate when condition is true- 返回:
- Return the current object to support chain programming style
-
groupBy
- 指定者:
groupBy在接口中MutableQuery- 指定者:
groupBy在接口中MutableRootQuery<T extends Table<?>>- 覆盖:
groupBy在类中AbstractMutableQueryImpl
-
having
- 指定者:
having在接口中MutableQuery- 指定者:
having在接口中MutableRootQuery<T extends Table<?>>- 覆盖:
having在类中AbstractMutableQueryImpl
-
orderBy
- 指定者:
orderBy在接口中MutableQuery- 指定者:
orderBy在接口中MutableRootQuery<T extends Table<?>>- 指定者:
orderBy在接口中Sortable- 覆盖:
orderBy在类中AbstractMutableQueryImpl
-
orderByIf
- 指定者:
orderByIf在接口中MutableQuery- 指定者:
orderByIf在接口中MutableRootQuery<T extends Table<?>>- 指定者:
orderByIf在接口中Sortable- 覆盖:
orderByIf在类中AbstractMutableQueryImpl
-
orderBy
- 指定者:
orderBy在接口中MutableQuery- 指定者:
orderBy在接口中MutableRootQuery<T extends Table<?>>- 指定者:
orderBy在接口中Sortable- 覆盖:
orderBy在类中AbstractMutableQueryImpl
-
orderByIf
- 指定者:
orderByIf在接口中MutableQuery- 指定者:
orderByIf在接口中MutableRootQuery<T extends Table<?>>- 指定者:
orderByIf在接口中Sortable- 覆盖:
orderByIf在类中AbstractMutableQueryImpl
-
orderBy
- 指定者:
orderBy在接口中MutableQuery- 指定者:
orderBy在接口中MutableRootQuery<T extends Table<?>>- 指定者:
orderBy在接口中Sortable- 覆盖:
orderBy在类中AbstractMutableQueryImpl
-
orderByIf
- 指定者:
orderByIf在接口中MutableQuery- 指定者:
orderByIf在接口中MutableRootQuery<T extends Table<?>>- 指定者:
orderByIf在接口中Sortable- 覆盖:
orderByIf在类中AbstractMutableQueryImpl
-
exists
- 指定者:
exists在接口中MutableRootQuery<T extends Table<?>>
-