Top Description Fields Constructors Methods
org.jooq.impl

pack-priv abstract Class AbstractBindContext

extends AbstractContext<BindContext>
implements BindContext
Class Inheritance
All Implemented Interfaces
org.jooq.BindContext, org.jooq.Context, org.jooq.ExecuteScope, org.jooq.Scope
Known Direct Subclasses
org.jooq.impl.ParamCollector, org.jooq.impl.DefaultBindContext
Imports
java.sql.PreparedStatement, .SQLException, org.jooq.BindContext, .Configuration, .ExecuteContext, .Field, .QueryPart, .QueryPartInternal, org.jooq.exception.DataAccessException

A base class for BindContext implementations
Author
Lukas Eder

Field Summary

Inherited from org.jooq.impl.AbstractContext:
castModecastModeOverridectxdeclareAliasesdeclareCTEdeclareFieldsdeclareTablesdeclareWindowsderivedTableSubqueryforcedParamTypeindexlanguageContextparamTypepredicandSubqueryqualifyCatalogqualifySchemaquotescopeMarkingscopeStacksetOperationSubqueryskipUpdateCountsstmtstringLiteralstringLiteralEscapedApossubquerysubqueryScopedNestedSetOperationstopLeveltopLevelForLanguageContext

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected void
bindInternal(QueryPartInternal internal)

Subclasses may override this method to achieve different behaviour

public final BindContext
bindValue(Object value, Field<?> field)

Implements org.jooq.Context.bindValue.

Deprecated as a consequence of Field being deprecated.
Bind a value using a specific type.
protected BindContext
bindValue0(Object value, Field<?> field)

Deprecated as a consequence of Field being deprecated.
Subclasses may override this method to achieve different behaviour
public final BindContext
format(boolean format)

Implements org.jooq.Context.format.

Override the value of Settings#isRenderFormatted().
public final boolean
public final BindContext
formatIndentEnd()

Implements org.jooq.Context.formatIndentEnd.

Stop indenting subsequent SQL by one level (two characters), if Settings#isRenderFormatted() is set to true.
public final BindContext
formatIndentEnd(int indent)

Implements org.jooq.Context.formatIndentEnd.

Stop indenting subsequent SQL by a number of characters, if Settings#isRenderFormatted() is set to true.
public final BindContext
formatIndentLockEnd()

Implements org.jooq.Context.formatIndentLockEnd.

Stop indenting subsequent SQL at the same level as the current line, if Settings#isRenderFormatted() is set to true.
public final BindContext
formatIndentLockStart()

Implements org.jooq.Context.formatIndentLockStart.

Start indenting subsequent SQL at the same level as the current line, if Settings#isRenderFormatted() is set to true.
public final BindContext
formatIndentStart()

Implements org.jooq.Context.formatIndentStart.

Start indenting subsequent SQL by one level (two characters), if Settings#isRenderFormatted() is set to true.
public final BindContext
formatIndentStart(int indent)

Implements org.jooq.Context.formatIndentStart.

Start indenting subsequent SQL by a number of characters, if Settings#isRenderFormatted() is set to true.
public final BindContext
formatNewLine()

Implements org.jooq.Context.formatNewLine.

Render a new line character (only if Settings#isRenderFormatted() is set to true).
public final BindContext
formatNewLineAfterPrintMargin()

Implements org.jooq.Context.formatNewLineAfterPrintMargin.

Render a new line character (only if Settings#isRenderFormatted() is set to true, and the formatPrintMargin(int) has been exceeded).
public final BindContext
formatPrintMargin(int margin)

Implements org.jooq.Context.formatPrintMargin.

Set a print margin that will be applied to formatted SQL, if Settings#isRenderFormatted() is set to true.
public final BindContext
formatSeparator()

Implements org.jooq.Context.formatSeparator.

Render a new line character (only if Settings#isRenderFormatted() is set to true), or a whitespace separator character otherwise.
public final BindContext
keyword(String keyword)

Implements org.jooq.Context.keyword.

Append a SQL keyword to the context's contained StringBuilder.
public final BindContext
literal(String literal)

Implements org.jooq.Context.literal.

Append some literal to the context's contained StringBuilder.
public final String
nextAlias()

Implements org.jooq.Context.nextAlias.

Return a new alias that is unique for the scope of one query.
public final String
peekAlias()

Implements org.jooq.Context.peekAlias.

Peek the next alias that will be generated by nextAlias().
public final String
render()

Implements org.jooq.Context.render.

Render the context's underlying SQL statement.
public final String
render(QueryPart part)

Implements org.jooq.Context.render.

Render a query part in a new context derived from this one.
public final BindContext
separatorRequired(boolean separatorRequired)

Implements org.jooq.Context.separatorRequired.

Specify that a separator will be required before the next visit(QueryPart) call, but leave the decision whether to generate a formatSeparator() or just a whitespace to that next QueryPart.
public final boolean
separatorRequired()

Implements org.jooq.Context.separatorRequired.

Whether some sort of separator is required before rendering the next QueryPart.
public final BindContext
sql(String sql)

Implements org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.
public final BindContext
sql(String sql, boolean literal)

Implements org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.
public final BindContext
sql(char sql)

Implements org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.
public final BindContext
sql(int sql)

Implements org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.
public final BindContext
sql(long sql)

Implements org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.
public final BindContext
sql(float sql)

Implements org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.
public final BindContext
sql(double sql)

Implements org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.
public final BindContext
sqlIndentEnd(String sql)

Implements org.jooq.Context.sqlIndentEnd.

Append some SQL to the context's contained StringBuilder preceded by the usual calls to formatIndentEnd() and formatNewLine().
public final BindContext
sqlIndentEnd()

Implements org.jooq.Context.sqlIndentEnd.

Append some SQL to the context's contained StringBuilder preceded by the usual calls to formatIndentEnd() and formatNewLine().
public final BindContext
sqlIndentEnd(char sql)

Implements org.jooq.Context.sqlIndentEnd.

Append some SQL to the context's contained StringBuilder preceded by the usual calls to formatIndentEnd() and formatNewLine().
public final BindContext
sqlIndentStart(String sql)

Implements org.jooq.Context.sqlIndentStart.

Append some SQL to the context's contained StringBuilder, followed by the usual calls to formatIndentStart() and formatNewLine().
public final BindContext
sqlIndentStart()

Implements org.jooq.Context.sqlIndentStart.

Append some SQL to the context's contained StringBuilder, followed by the usual calls to formatIndentStart() and formatNewLine().
public final BindContext
sqlIndentStart(char sql)

Implements org.jooq.Context.sqlIndentStart.

Append some SQL to the context's contained StringBuilder, followed by the usual calls to formatIndentStart() and formatNewLine().
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
protected void
Inherited from org.jooq.impl.AbstractContext:
applyNameCasecastModecastModecastModecastModeIfconverterContextdatadeclareAliasesdeclareAliasesdeclareAliasesdeclareCTEdeclareCTEdeclareCTEdeclareFieldsdeclareFieldsdeclareFieldsdeclareTablesdeclareTablesdeclareTablesdeclareWindowsdeclareWindowsdeclareWindowsderivedTableSubqueryderivedTableSubquerydoubleFormatendexecuteContextfloatFormatlanguageContextlanguageContextlanguageContextlanguageContextlanguageContextIfnextIndexparamTypeparamTypeparamTypeparamTypeIfparamTypeIfpeekIndexpredicandSubquerypredicandSubqueryqualifyqualifyqualifyqualifyCatalogqualifyCatalogqualifyCatalogqualifySchemaqualifySchemaqualifySchemaquotequotequoteresetDataKeysrestoreDataKeysscopeEndscopeEnd0scopeLevelscopeMappingscopeMarkEndscopeMarkEnd0scopeMarkStartscopeMarkStart0scopeRegisterscopeRegisterscopeRegisterscopeRegisterAndMarkscopeStartscopeStart0setOperationSubquerysetOperationSubqueryskipUpdateCountskipUpdateCountsskipUpdateCountsstartstatementstringLiteralstringLiteralsubquerysubquerysubquery0subqueryLeveltopLeveltopLeveltopLevelForLanguageContexttopLevelForLanguageContexttoStringvisitvisitvisitvisitvisitSubquery

Constructor Detail

AbstractBindContextback to summary
pack-priv AbstractBindContext(Configuration configuration, ExecuteContext ctx, PreparedStatement stmt)

Method Detail

bindInternalback to summary
protected void bindInternal(QueryPartInternal internal)

Subclasses may override this method to achieve different behaviour

bindValueback to summary
public final BindContext bindValue(Object value, Field<?> field) throws DataAccessException

Implements org.jooq.Context.bindValue.

Doc from org.jooq.Context.bindValue.

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.

Bind a value using a specific type. This will also increment the internal counter.

Annotations
@Override
Exceptions
DataAccessException:
If something went wrong while binding a variable
bindValue0back to summary
protected BindContext bindValue0(Object value, Field<?> field) throws SQLException

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.

Subclasses may override this method to achieve different behaviour

Annotations
@SuppressWarnings:unused
formatback to summary
public final BindContext format(boolean format)

Implements org.jooq.Context.format.

Doc from org.jooq.Context.format.

Override the value of Settings#isRenderFormatted().

Annotations
@Override
formatback to summary
public final boolean format()

Implements org.jooq.Context.format.

Doc from org.jooq.Context.format.

The value of Settings#isRenderFormatted().

Annotations
@Override
formatIndentEndback to summary
public final BindContext formatIndentEnd()

Implements org.jooq.Context.formatIndentEnd.

Doc from org.jooq.Context.formatIndentEnd.

Stop indenting subsequent SQL by one level (two characters), if Settings#isRenderFormatted() is set to true.

This is the same as calling formatIndentEnd(int) with a parameter of 2

Annotations
@Override
formatIndentEndback to summary
public final BindContext formatIndentEnd(int indent)

Implements org.jooq.Context.formatIndentEnd.

Doc from org.jooq.Context.formatIndentEnd.

Stop indenting subsequent SQL by a number of characters, if Settings#isRenderFormatted() is set to true.

Annotations
@Override
formatIndentLockEndback to summary
public final BindContext formatIndentLockEnd()

Implements org.jooq.Context.formatIndentLockEnd.

Doc from org.jooq.Context.formatIndentLockEnd.

Stop indenting subsequent SQL at the same level as the current line, if Settings#isRenderFormatted() is set to true.

Annotations
@Override
formatIndentLockStartback to summary
public final BindContext formatIndentLockStart()

Implements org.jooq.Context.formatIndentLockStart.

Doc from org.jooq.Context.formatIndentLockStart.

Start indenting subsequent SQL at the same level as the current line, if Settings#isRenderFormatted() is set to true.

Annotations
@Override
formatIndentStartback to summary
public final BindContext formatIndentStart()

Implements org.jooq.Context.formatIndentStart.

Doc from org.jooq.Context.formatIndentStart.

Start indenting subsequent SQL by one level (two characters), if Settings#isRenderFormatted() is set to true.

This is the same as calling formatIndentStart(int) with a parameter of 2

Annotations
@Override
formatIndentStartback to summary
public final BindContext formatIndentStart(int indent)

Implements org.jooq.Context.formatIndentStart.

Doc from org.jooq.Context.formatIndentStart.

Start indenting subsequent SQL by a number of characters, if Settings#isRenderFormatted() is set to true.

Annotations
@Override
formatNewLineback to summary
public final BindContext formatNewLine()

Implements org.jooq.Context.formatNewLine.

Doc from org.jooq.Context.formatNewLine.

Render a new line character (only if Settings#isRenderFormatted() is set to true).

Annotations
@Override
formatNewLineAfterPrintMarginback to summary
public final BindContext formatNewLineAfterPrintMargin()

Implements org.jooq.Context.formatNewLineAfterPrintMargin.

Doc from org.jooq.Context.formatNewLineAfterPrintMargin.

Render a new line character (only if Settings#isRenderFormatted() is set to true, and the formatPrintMargin(int) has been exceeded).

Annotations
@Override
formatPrintMarginback to summary
public final BindContext formatPrintMargin(int margin)

Implements org.jooq.Context.formatPrintMargin.

Doc from org.jooq.Context.formatPrintMargin.

Set a print margin that will be applied to formatted SQL, if Settings#isRenderFormatted() is set to true.

The default print margin is 80. Setting this to zero or a negative value means that no print margin will be applied.

The print margin is applied to any of these QueryParts:

Annotations
@Override
formatSeparatorback to summary
public final BindContext formatSeparator()

Implements org.jooq.Context.formatSeparator.

Doc from org.jooq.Context.formatSeparator.

Render a new line character (only if Settings#isRenderFormatted() is set to true), or a whitespace separator character otherwise.

Annotations
@Override
keywordback to summary
public final BindContext keyword(String keyword)

Implements org.jooq.Context.keyword.

Doc from org.jooq.Context.keyword.

Append a SQL keyword to the context's contained StringBuilder.

Use this to have your SQL keyword rendered in RenderKeywordCase.

Annotations
@Override
literalback to summary
public final BindContext literal(String literal)

Implements org.jooq.Context.literal.

Doc from org.jooq.Context.literal.

Append some literal to the context's contained StringBuilder.

Annotations
@Override
nextAliasback to summary
public final String nextAlias()

Implements org.jooq.Context.nextAlias.

Doc from org.jooq.Context.nextAlias.

Return a new alias that is unique for the scope of one query. These aliases are sometimes needed when unaliased projections are defined in subqueries, which can lead to syntax errors.

Annotations
@Override
peekAliasback to summary
public final String peekAlias()

Implements org.jooq.Context.peekAlias.

Doc from org.jooq.Context.peekAlias.

Peek the next alias that will be generated by nextAlias().

Annotations
@Override
renderback to summary
public final String render()

Implements org.jooq.Context.render.

Doc from org.jooq.Context.render.

Render the context's underlying SQL statement.

Annotations
@Override
renderback to summary
public final String render(QueryPart part)

Implements org.jooq.Context.render.

Doc from org.jooq.Context.render.

Render a query part in a new context derived from this one. The rendered SQL will not be appended to this context.

Annotations
@Override
separatorRequiredback to summary
public final BindContext separatorRequired(boolean separatorRequired)

Implements org.jooq.Context.separatorRequired.

Doc from org.jooq.Context.separatorRequired.

Specify that a separator will be required before the next visit(QueryPart) call, but leave the decision whether to generate a formatSeparator() or just a whitespace to that next QueryPart.

Annotations
@Override
separatorRequiredback to summary
public final boolean separatorRequired()

Implements org.jooq.Context.separatorRequired.

Doc from org.jooq.Context.separatorRequired.

Whether some sort of separator is required before rendering the next QueryPart.

Annotations
@Override
sqlback to summary
public final BindContext sql(String sql)

Implements org.jooq.Context.sql.

Doc from org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.

Annotations
@Override
sqlback to summary
public final BindContext sql(String sql, boolean literal)

Implements org.jooq.Context.sql.

Doc from org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.

Set literal = true to indicate that the RenderContext shall not format the argument SQL.

Annotations
@Override
sqlback to summary
public final BindContext sql(char sql)

Implements org.jooq.Context.sql.

Doc from org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.

Annotations
@Override
sqlback to summary
public final BindContext sql(int sql)

Implements org.jooq.Context.sql.

Doc from org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.

Annotations
@Override
sqlback to summary
public final BindContext sql(long sql)

Implements org.jooq.Context.sql.

Doc from org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.

Annotations
@Override
sqlback to summary
public final BindContext sql(float sql)

Implements org.jooq.Context.sql.

Doc from org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.

Annotations
@Override
sqlback to summary
public final BindContext sql(double sql)

Implements org.jooq.Context.sql.

Doc from org.jooq.Context.sql.

Append some SQL to the context's contained StringBuilder.

Annotations
@Override
sqlIndentEndback to summary
public final BindContext sqlIndentEnd(String sql)

Implements org.jooq.Context.sqlIndentEnd.

Doc from org.jooq.Context.sqlIndentEnd.

Append some SQL to the context's contained StringBuilder preceded by the usual calls to formatIndentEnd() and formatNewLine().

Annotations
@Override
sqlIndentEndback to summary
public final BindContext sqlIndentEnd()

Implements org.jooq.Context.sqlIndentEnd.

Doc from org.jooq.Context.sqlIndentEnd.

Append some SQL to the context's contained StringBuilder preceded by the usual calls to formatIndentEnd() and formatNewLine().

Annotations
@Override
sqlIndentEndback to summary
public final BindContext sqlIndentEnd(char sql)

Implements org.jooq.Context.sqlIndentEnd.

Doc from org.jooq.Context.sqlIndentEnd.

Append some SQL to the context's contained StringBuilder preceded by the usual calls to formatIndentEnd() and formatNewLine().

Annotations
@Override
sqlIndentStartback to summary
public final BindContext sqlIndentStart(String sql)

Implements org.jooq.Context.sqlIndentStart.

Doc from org.jooq.Context.sqlIndentStart.

Append some SQL to the context's contained StringBuilder, followed by the usual calls to formatIndentStart() and formatNewLine().

Annotations
@Override
sqlIndentStartback to summary
public final BindContext sqlIndentStart()

Implements org.jooq.Context.sqlIndentStart.

Doc from org.jooq.Context.sqlIndentStart.

Append some SQL to the context's contained StringBuilder, followed by the usual calls to formatIndentStart() and formatNewLine().

Annotations
@Override
sqlIndentStartback to summary
public final BindContext sqlIndentStart(char sql)

Implements org.jooq.Context.sqlIndentStart.

Doc from org.jooq.Context.sqlIndentStart.

Append some SQL to the context's contained StringBuilder, followed by the usual calls to formatIndentStart() and formatNewLine().

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
visit0back to summary
protected void visit0(QueryPartInternal internal)

Implements abstract org.jooq.impl.AbstractContext.visit0.

Annotations
@Override