Top Inners Fields Constructors Methods
org.jooq.impl

pack-priv abstract Class AbstractContext<C extends org.jooq.Context<C>>

extends AbstractScope
implements Context<C extends Context<C>>
Class Inheritance
All Implemented Interfaces
org.jooq.Context, org.jooq.ExecuteScope, org.jooq.Scope
Known Direct Subclasses
org.jooq.impl.DefaultRenderContext, org.jooq.impl.AbstractBindContext
Annotations
@SuppressWarnings:unchecked
Static Imports
java.lang.Boolean.TRUE, org.jooq.JoinType.JOIN, .JoinType.LEFT_OUTER_JOIN, org.jooq.conf.InvocationOrder.REVERSE, .ParamType.INDEXED, org.jooq.impl.Tools.DATAKEY_RESET_IN_SUBQUERY_SCOPE, .Tools.EMPTY_CLAUSE, .Tools.EMPTY_QUERYPART, .Tools.lazy, .Tools.BooleanDataKey.DATA_NESTED_SET_OPERATIONS, .Tools.BooleanDataKey.DATA_OMIT_CLAUSE_EVENT_EMISSION

Author
Lukas Eder

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
AbstractContext.DefaultVisitContext

A VisitContext is always in the scope of the current RenderContext.

pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv RenderContext.CastMode
pack-priv final boolean
pack-priv final ExecuteContext
pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv boolean
private transient DecimalFormat
private transient DecimalFormat
pack-priv final ParamType
pack-priv int
pack-priv LanguageContext
pack-priv ParamType
pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv int
pack-priv final ScopeStack<QueryPart, AbstractContext.ScopeStackElement>
pack-priv boolean
pack-priv int
pack-priv final PreparedStatement
pack-priv int
pack-priv String
pack-priv int
pack-priv BitSet
pack-priv QueryPart
pack-priv QueryPart
private final Deque<Clause>
private final AbstractContext<C>.DefaultVisitContext
private final VisitListener[]
private final VisitListener[]
private final Deque<QueryPart>
Inherited from org.jooq.impl.AbstractScope:
configurationcreationTimedata

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv String
public final RenderContext.CastMode
castMode()

Implements org.jooq.Context.castMode.

The currently applied cast mode for bind values.
public final C
castMode(RenderContext.CastMode mode)

Implements org.jooq.Context.castMode.

Set the new cast mode for castMode().
public final C
castMode(RenderContext.CastMode mode, Consumer<? super C> consumer)

Implements org.jooq.Context.castMode.

Set the new cast mode for castMode() for the scope of a Consumer.
public final C
castModeIf(RenderContext.CastMode mode, boolean condition)

Implements org.jooq.Context.castModeIf.

Set the new cast mode for castMode(), if a condition is true.
private final Clause[]
clause(QueryPart part)

Deprecated as a consequence of Clause being deprecated.
Emit a clause from a query part being visited.
public final ConverterContext
public final C
data(Object key, Object value, Consumer<? super C> consumer)

Implements org.jooq.Context.data.

Set a data value for a key for the scope of a Consumer.
public final boolean
declareAliases()

Implements org.jooq.Context.declareAliases.

Whether the current context is rendering a SQL alias declarations in declareTables() or declareFields() sections.
public final C
declareAliases(boolean d)

Implements org.jooq.Context.declareAliases.

Whether the current context is rendering a SQL alias declarations in declareTables() or declareFields() sections.
public C
declareAliases(boolean f, Consumer<? super C> consumer)

Implements org.jooq.Context.declareAliases.

Whether the current context is rendering a SQL alias declarations in declareTables() or declareFields() sections for the scope of a Consumer.
public final boolean
declareCTE()

Implements org.jooq.Context.declareCTE.

Whether the current context is rendering a common table expression (e.g. a CommonTableExpression in the WITH clause of the query).
public final C
declareCTE(boolean d)

Implements org.jooq.Context.declareCTE.

Set the new context value for declareCTE().
public C
declareCTE(boolean f, Consumer<? super C> consumer)

Implements org.jooq.Context.declareCTE.

Set the new context value for declareCTE() for the scope of a Consumer.
public final boolean
declareFields()

Implements org.jooq.Context.declareFields.

Whether the current context is rendering a SQL field declaration (e.g. a Field in the SELECT clause of the query).
public final C
declareFields(boolean d)

Implements org.jooq.Context.declareFields.

Set the new context value for declareFields().
public C
declareFields(boolean f, Consumer<? super C> consumer)

Implements org.jooq.Context.declareFields.

Set the new context value for declareFields() for the scope of a Consumer.
public final boolean
declareTables()

Implements org.jooq.Context.declareTables.

Whether the current context is rendering a SQL table declaration (e.g. a Table in the FROM or JOIN clause of the query).
public final C
declareTables(boolean d)

Implements org.jooq.Context.declareTables.

Set the new context value for declareTables().
public C
declareTables(boolean f, Consumer<? super C> consumer)

Implements org.jooq.Context.declareTables.

Set the new context value for declareTables() for the scope of a Consumer.
public final boolean
declareWindows()

Implements org.jooq.Context.declareWindows.

Whether the current context is rendering a SQL window declaration (e.g. a WindowDefinition in the WINDOW clause of the query).
public final C
declareWindows(boolean d)

Implements org.jooq.Context.declareWindows.

Set the new context value for declareWindows().
public C
declareWindows(boolean f, Consumer<? super C> consumer)

Implements org.jooq.Context.declareWindows.

Set the new context value for declareWindows() for the scope of a Consumer.
public final boolean
derivedTableSubquery()

Implements org.jooq.Context.derivedTableSubquery.

Whether the current context is rendering a derived table subquery.
public final C
derivedTableSubquery(boolean s)

Implements org.jooq.Context.derivedTableSubquery.

Set the new context value for derivedTableSubquery().
public final DecimalFormat
doubleFormat()

Implements org.jooq.Context.doubleFormat.

A formatter to produce scientific notation for Double types.
public final C
end(Clause clause)

Implements org.jooq.Context.end.

Deprecated as a consequence of Clause being deprecated.
private final void
end(QueryPart part)

public final ExecuteContext
executeContext()

Implements org.jooq.ExecuteScope.executeContext.

The ExecuteContext that created this scope.
public final DecimalFormat
floatFormat()

Implements org.jooq.Context.floatFormat.

A formatter to produce scientific notation for Float types.
public final LanguageContext
languageContext()

Implements org.jooq.Context.languageContext.

The current language context.
public final C
languageContext(LanguageContext context)

Implements org.jooq.Context.languageContext.

Set the new language context for languageContext()
public final C
languageContext(LanguageContext context, Consumer<? super C> consumer)

Implements org.jooq.Context.languageContext.

Set the new language context for languageContext() for the scope of a Consumer.
public final C
languageContext(LanguageContext context, QueryPart newTopLevelForLanguageContext, Consumer<? super C> consumer)

Implements org.jooq.Context.languageContext.

Set the new language context for languageContext() for the scope of a Consumer.
public final C
languageContextIf(LanguageContext context, boolean condition)

Implements org.jooq.Context.languageContextIf.

Set the new language context for languageContext(), if a condition is true.
public final int
nextIndex()

Implements org.jooq.Context.nextIndex.

Get the next bind index.
public final ParamType
paramType()

Implements org.jooq.Context.paramType.

Specify, how bind values should be rendered.
public final C
paramType(ParamType p)

Implements org.jooq.Context.paramType.

Set the new context value for paramType().
public final C
paramType(ParamType p, Consumer<? super C> runnable)

Implements org.jooq.Context.paramType.

Set the new context value for paramType() for the scope of a Consumer.
public final C
paramTypeIf(ParamType p, boolean condition)

Implements org.jooq.Context.paramTypeIf.

Set the new context value for paramType(), if a condition is true.
public final C
paramTypeIf(ParamType p, boolean condition, Consumer<? super C> runnable)

Implements org.jooq.Context.paramTypeIf.

Set the new context value for paramType() for the scope of a Consumer, if a condition is true.
public final int
peekIndex()

Implements org.jooq.Context.peekIndex.

Peek the next bind index.
public final boolean
predicandSubquery()

Implements org.jooq.Context.predicandSubquery.

Whether the current context is rendering a predicand subquery, i.e. a subquery that is an operand of a predicate.
public final C
predicandSubquery(boolean s)

Implements org.jooq.Context.predicandSubquery.

Set the new context value for predicandSubquery().
public final boolean
qualify()

Implements org.jooq.Context.qualify.

Whether query parts should render qualified names or not.
public final C
qualify(boolean q)

Implements org.jooq.Context.qualify.

Set the new context value for qualify().
public final C
qualify(boolean q, Consumer<? super C> consumer)

Implements org.jooq.Context.qualify.

Set the new context value for qualify() for the scope of a Consumer.
public final boolean
qualifyCatalog()

Implements org.jooq.Context.qualifyCatalog.

Whether query parts should render qualified names or not.
public final C
qualifyCatalog(boolean q)

Implements org.jooq.Context.qualifyCatalog.

Set the new context value for qualifyCatalog().
public final C
qualifyCatalog(boolean q, Consumer<? super C> consumer)

Implements org.jooq.Context.qualifyCatalog.

Set the new context value for qualifyCatalog() for the scope of a Consumer.
public final boolean
qualifySchema()

Implements org.jooq.Context.qualifySchema.

Whether query parts should render qualified names or not.
public final C
qualifySchema(boolean q)

Implements org.jooq.Context.qualifySchema.

Set the new context value for qualifySchema().
public final C
qualifySchema(boolean q, Consumer<? super C> consumer)

Implements org.jooq.Context.qualifySchema.

Set the new context value for qualifySchema() for the scope of a Consumer.
public final boolean
quote()

Implements org.jooq.Context.quote.

Whether Name parts (and literal(String)) should be quoted.
public final C
quote(boolean q)

Implements org.jooq.Context.quote.

Set the new context value for quote().
public final C
quote(boolean q, Consumer<? super C> consumer)

Implements org.jooq.Context.quote.

Set the new context value for quote() for the scope of a Consumer.
pack-priv final void
pack-priv final void
public final C
scopeEnd()

Implements org.jooq.Context.scopeEnd.

End a previous SELECT scope.
pack-priv void
public final int
scopeLevel()

Implements org.jooq.Context.scopeLevel.

Which level of scopes we're currently in, starting with 0 for the top scope.
public QueryPart
scopeMapping(QueryPart part)

Implements org.jooq.Context.scopeMapping.

Retrieve the registered mapping for a query part in the current scope.
public final C
scopeMarkEnd(QueryPart part)

Implements org.jooq.Context.scopeMarkEnd.

Mark the end of a scoped query part.
pack-priv void
public final C
scopeMarkStart(QueryPart part)

Implements org.jooq.Context.scopeMarkStart.

Mark the beginning of a scoped query part.
pack-priv void
public final C
scopeRegister(QueryPart part)

Implements org.jooq.Context.scopeRegister.

Register a "special" query part in the scope, reusing the object from a higher scope, if available.
public final C
scopeRegister(QueryPart part, boolean forceNew)

Implements org.jooq.Context.scopeRegister.

Register a "special" query part in the scope, allowing to force registering the object in the new scope, if a higher scope already has the object.
public C
scopeRegister(QueryPart part, boolean forceNew, QueryPart mapped)

Implements org.jooq.Context.scopeRegister.

Register a "special" query part in the scope, allowing to force registering the object in the new scope, if a higher scope already has the object, as well as providing a mapped part to map the original part to.
public final C
public final C
scopeStart()

Implements org.jooq.Context.scopeStart.

Start a new scope.
pack-priv void
public final boolean
setOperationSubquery()

Implements org.jooq.Context.setOperationSubquery.

Whether the current context is rendering a set operation subquery.
public final C
setOperationSubquery(boolean s)

Implements org.jooq.Context.setOperationSubquery.

Set the new context value for setOperationSubquery().
public final C
skipUpdateCount()

Implements org.jooq.Context.skipUpdateCount.

Skip an additional update count produced by this query.
public final int
skipUpdateCounts()

Implements org.jooq.Context.skipUpdateCounts.

The number of update counts to be skipped by this query.
public final C
skipUpdateCounts(int skip)

Implements org.jooq.Context.skipUpdateCounts.

Skip a number of additional update counts produced by this query.
public final C
start(Clause clause)

Implements org.jooq.Context.start.

Deprecated as a consequence of Clause being deprecated.
TODO [#2667] Properties of these methods: - A clause is always started / ended, even if it isn't rendered or if it's empty!
private final QueryPart
public final PreparedStatement
statement()

Implements org.jooq.Context.statement.

Retrieve the context's underlying PreparedStatement if available, or null if this traversal does not operate on a PreparedStatement.
public final boolean
stringLiteral()

Implements org.jooq.Context.stringLiteral.

whether the current context is rendering a string literal.
public final C
stringLiteral(boolean s)

Implements org.jooq.Context.stringLiteral.

Set the new context value for stringLiteral().
public final boolean
subquery()

Implements org.jooq.Context.subquery.

Whether the current context is rendering a subquery (nested query).
public final C
subquery(boolean s)

Implements org.jooq.Context.subquery.

Set the new context value for subquery().
pack-priv final C
subquery0(boolean s, boolean setOperation)

public final int
subqueryLevel()

Implements org.jooq.Context.subqueryLevel.

Which level of subqueries we're currently in, starting with 0 for the top level query.
private final C
toggle(boolean b, BooleanSupplier get, BooleanConsumer set, Consumer<? super C> consumer)

private final <T> C
toggle(T t, Supplier<T> get, Consumer<T> set, Consumer<? super C> consumer)

public final QueryPart
topLevel()

Implements org.jooq.Context.topLevel.

The top level QueryPart that is being rendered.
public final C
topLevel(QueryPart t)

Implements org.jooq.Context.topLevel.

Set the top level QueryPart that is being rendered.
public final QueryPart
topLevelForLanguageContext()

Implements org.jooq.Context.topLevelForLanguageContext.

The top level QueryPart that is being rendered in the current languageContext().
public final C
topLevelForLanguageContext(QueryPart t)

Implements org.jooq.Context.topLevelForLanguageContext.

Set the top level QueryPart that is being rendered in the current languageContext().
pack-priv void
public final C
visit(Condition part)

Implements org.jooq.Context.visit.

Deprecated as a consequence of Condition being deprecated.
Visit a Condition as an ordinary QueryPart.
public final C
visit(Field<?> part)

Implements org.jooq.Context.visit.

Deprecated as a consequence of Field being deprecated.
Visit a Field as a DSL#field(Condition), if it is a Condition, or as an ordinery QueryPart, otherwise.
public final C
visit(QueryPart
The component QueryPart
part
)

Implements org.jooq.Context.visit.

Visit a QueryPart in the current Context.
public final C
visit(QueryPart part, ParamType p)

Implements org.jooq.Context.visit.

Visit a query part with a given value for paramType().
protected abstract void
public final C
visitSubquery(QueryPart
The component QueryPart
part
)

Implements org.jooq.Context.visitSubquery.

Visit a QueryPart as a subquery in the current Context.
Inherited from org.jooq.impl.AbstractScope:
configurationcreationTimedatadatadatadialectdslfamilysettings