- 
- All Superinterfaces:
- Context<RenderContext>,- Scope
 
 public interface RenderContext extends Context<RenderContext> The render context is used for renderingQueryPart's to SQL.A new render context is instantiated every time a Queryis rendered.QueryPart's will then pass the same context to their components- Author:
- Lukas Eder
- See Also:
- BindContext
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classRenderContext.CastModeThe cast mode for bind values.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Booleancast()Deprecated.- [#3703] - 3.5.0 - Do not use this any longerRenderContext.CastModecastMode()The currently applied cast mode for bind values.RenderContextcastMode(RenderContext.CastMode mode)Set the new cast mode forcastMode().RenderContextcastModeSome(SQLDialect... dialects)Deprecated.- [#3703] - 3.5.0 - Do not use this any longerbooleanformat()The value ofSettings.isRenderFormatted().RenderContextformat(boolean format)Override the value ofSettings.isRenderFormatted().RenderContextformatIndentEnd()Stop indenting subsequent SQL by one level (two characters), ifSettings.isRenderFormatted()is set totrue.RenderContextformatIndentEnd(int indent)Stop indenting subsequent SQL by a number of characters, ifSettings.isRenderFormatted()is set totrue.RenderContextformatIndentLockEnd()Stop indenting subsequent SQL at the same level as the current line, ifSettings.isRenderFormatted()is set totrue.RenderContextformatIndentLockStart()Start indenting subsequent SQL at the same level as the current line, ifSettings.isRenderFormatted()is set totrue.RenderContextformatIndentStart()Start indenting subsequent SQL by one level (two characters), ifSettings.isRenderFormatted()is set totrue.RenderContextformatIndentStart(int indent)Start indenting subsequent SQL by a number of characters, ifSettings.isRenderFormatted()is set totrue.RenderContextformatNewLine()Render a new line character (only ifSettings.isRenderFormatted()is set totrue).RenderContextformatNewLineAfterPrintMargin()Render a new line character (only ifSettings.isRenderFormatted()is set totrue, and theformatPrintMargin(int)has been exceeded).RenderContextformatPrintMargin(int margin)Set a print margin that will be applied to formatted SQL, ifSettings.isRenderFormatted()is set totrue.RenderContextformatSeparator()Render a new line character (only ifSettings.isRenderFormatted()is set totrue), or a whitespace separator character otherwise.booleaninline()Deprecated.- 3.1.0 - [#2414] - This method should no longer be used.RenderContextinline(boolean inline)Deprecated.- 3.1.0 - [#2414] - This method should no longer be used.RenderContextkeyword(String keyword)Append a SQL keyword to the context's containedStringBuilder.RenderContextliteral(String literal)Append some (quoted) literal to the context's containedStringBuilder.booleannamedParams()Deprecated.- 3.1.0 - [#2414] - This method should no longer be used.RenderContextnamedParams(boolean renderNamedParams)Deprecated.- 3.1.0 - [#2414] - This method should no longer be used.StringnextAlias()Return a new alias that is unique for the scope of one query.ParamTypeparamType()Specify, how bind values should be rendered.RenderContextparamType(ParamType paramType)Set the new context value forparamType().StringpeekAlias()Peek the next alias that will be generated bynextAlias().booleanqualify()Whether query parts should render qualified names or not.RenderContextqualify(boolean qualify)Sett the new context value forqualify().Stringrender()Render the context's underlying SQL statement.Stringrender(QueryPart part)Render a query part in a new context derived from this one.RenderContextsql(char sql)Append some SQL to the context's containedStringBuilder.RenderContextsql(double sql)Append some SQL to the context's containedStringBuilder.RenderContextsql(float sql)Append some SQL to the context's containedStringBuilder.RenderContextsql(int sql)Append some SQL to the context's containedStringBuilder.RenderContextsql(long sql)Append some SQL to the context's containedStringBuilder.RenderContextsql(String sql)Append some SQL to the context's containedStringBuilder.RenderContextsql(String sql, boolean literal)Append some SQL to the context's containedStringBuilder.RenderContextsql(QueryPart part)Deprecated.- 3.2.0 - [#2666] - UseContext.visit(QueryPart)instead- 
Methods inherited from interface org.jooq.ContextbindValue, declareAliases, declareAliases, declareCTE, declareCTE, declareFields, declareFields, declareTables, declareTables, declareWindows, declareWindows, end, nextIndex, peekIndex, qualifyCatalog, qualifyCatalog, qualifySchema, qualifySchema, quote, quote, scopeEnd, scopeMarkEnd, scopeMarkStart, scopeRegister, scopeStart, start, statement, stringLiteral, stringLiteral, subquery, subquery, subqueryLevel, visit
 
- 
 
- 
- 
- 
Method Detail- 
peekAliasString peekAlias() Peek the next alias that will be generated bynextAlias().- Specified by:
- peekAliasin interface- Context<RenderContext>
 
 - 
nextAliasString 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.- Specified by:
- nextAliasin interface- Context<RenderContext>
 
 - 
renderString render() Render the context's underlying SQL statement.- Specified by:
- renderin interface- Context<RenderContext>
 
 - 
renderString render(QueryPart part) Render a query part in a new context derived from this one. The rendered SQL will not be appended to this context.- Specified by:
- renderin interface- Context<RenderContext>
 
 - 
keywordRenderContext keyword(String keyword) Append a SQL keyword to the context's containedStringBuilder.Use this to have your SQL keyword rendered in RenderKeywordCase.- Specified by:
- keywordin interface- Context<RenderContext>
 
 - 
sqlRenderContext sql(String sql) Append some SQL to the context's containedStringBuilder.- Specified by:
- sqlin interface- Context<RenderContext>
 
 - 
sqlRenderContext sql(String sql, boolean literal) Append some SQL to the context's containedStringBuilder.Set literal = trueto indicate that theRenderContextshall not format the argument SQL.- Specified by:
- sqlin interface- Context<RenderContext>
 
 - 
sqlRenderContext sql(char sql) Append some SQL to the context's containedStringBuilder.- Specified by:
- sqlin interface- Context<RenderContext>
 
 - 
sqlRenderContext sql(int sql) Append some SQL to the context's containedStringBuilder.- Specified by:
- sqlin interface- Context<RenderContext>
 
 - 
sqlRenderContext sql(long sql) Append some SQL to the context's containedStringBuilder.- Specified by:
- sqlin interface- Context<RenderContext>
 
 - 
sqlRenderContext sql(float sql) Append some SQL to the context's containedStringBuilder.- Specified by:
- sqlin interface- Context<RenderContext>
 
 - 
sqlRenderContext sql(double sql) Append some SQL to the context's containedStringBuilder.- Specified by:
- sqlin interface- Context<RenderContext>
 
 - 
sql@Deprecated RenderContext sql(QueryPart part) Deprecated.- 3.2.0 - [#2666] - UseContext.visit(QueryPart)insteadRecurse rendering.
 - 
formatRenderContext format(boolean format) Override the value ofSettings.isRenderFormatted().- Specified by:
- formatin interface- Context<RenderContext>
 
 - 
formatboolean format() The value ofSettings.isRenderFormatted().- Specified by:
- formatin interface- Context<RenderContext>
 
 - 
formatNewLineRenderContext formatNewLine() Render a new line character (only ifSettings.isRenderFormatted()is set totrue).- Specified by:
- formatNewLinein interface- Context<RenderContext>
 
 - 
formatNewLineAfterPrintMarginRenderContext formatNewLineAfterPrintMargin() Render a new line character (only ifSettings.isRenderFormatted()is set totrue, and theformatPrintMargin(int)has been exceeded).- Specified by:
- formatNewLineAfterPrintMarginin interface- Context<RenderContext>
 
 - 
formatSeparatorRenderContext formatSeparator() Render a new line character (only ifSettings.isRenderFormatted()is set totrue), or a whitespace separator character otherwise.- Specified by:
- formatSeparatorin interface- Context<RenderContext>
 
 - 
formatIndentStartRenderContext formatIndentStart() Start indenting subsequent SQL by one level (two characters), ifSettings.isRenderFormatted()is set totrue.This is the same as calling formatIndentStart(int)with a parameter of2- Specified by:
- formatIndentStartin interface- Context<RenderContext>
 
 - 
formatIndentStartRenderContext formatIndentStart(int indent) Start indenting subsequent SQL by a number of characters, ifSettings.isRenderFormatted()is set totrue.- Specified by:
- formatIndentStartin interface- Context<RenderContext>
 
 - 
formatIndentLockStartRenderContext formatIndentLockStart() Start indenting subsequent SQL at the same level as the current line, ifSettings.isRenderFormatted()is set totrue.- Specified by:
- formatIndentLockStartin interface- Context<RenderContext>
 
 - 
formatIndentEndRenderContext formatIndentEnd() Stop indenting subsequent SQL by one level (two characters), ifSettings.isRenderFormatted()is set totrue.This is the same as calling formatIndentEnd(int)with a parameter of2- Specified by:
- formatIndentEndin interface- Context<RenderContext>
 
 - 
formatIndentEndRenderContext formatIndentEnd(int indent) Stop indenting subsequent SQL by a number of characters, ifSettings.isRenderFormatted()is set totrue.- Specified by:
- formatIndentEndin interface- Context<RenderContext>
 
 - 
formatIndentLockEndRenderContext formatIndentLockEnd() Stop indenting subsequent SQL at the same level as the current line, ifSettings.isRenderFormatted()is set totrue.- Specified by:
- formatIndentLockEndin interface- Context<RenderContext>
 
 - 
formatPrintMarginRenderContext formatPrintMargin(int margin) Set a print margin that will be applied to formatted SQL, ifSettings.isRenderFormatted()is set totrue.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:-  Field.in(Field...)and related expressions
 - Specified by:
- formatPrintMarginin interface- Context<RenderContext>
 
-  
 - 
literalRenderContext literal(String literal) Append some (quoted) literal to the context's containedStringBuilder.- Specified by:
- literalin interface- Context<RenderContext>
 
 - 
inline@Deprecated boolean inline() Deprecated.- 3.1.0 - [#2414] - This method should no longer be used. UseparamType()instead.Whether bind variables should be inlined, rather than rendered as'?'.
 - 
inline@Deprecated RenderContext inline(boolean inline) Deprecated.- 3.1.0 - [#2414] - This method should no longer be used. UseparamType(ParamType)instead.Set the new context value forinline().
 - 
qualifyboolean qualify() Whether query parts should render qualified names or not.- Specified by:
- qualifyin interface- Context<RenderContext>
 
 - 
qualifyRenderContext qualify(boolean qualify) Sett the new context value forqualify().- Specified by:
- qualifyin interface- Context<RenderContext>
 
 - 
namedParams@Deprecated boolean namedParams() Deprecated.- 3.1.0 - [#2414] - This method should no longer be used. UseparamType()instead.Whether bind variables should be rendered as named parameters:
 :1, :2, :custom_nameor as JDBC bind variables 
 ?
 - 
namedParams@Deprecated RenderContext namedParams(boolean renderNamedParams) Deprecated.- 3.1.0 - [#2414] - This method should no longer be used. UseparamType(ParamType)instead.Set the new context value fornamedParams().
 - 
paramTypeParamType paramType() Specify, how bind values should be rendered.- As ParamType.INDEXEDparameters:
 ?, ?, ?
- As ParamType.NAMEDparameters:
 :1, :2, :custom_name
- As ParamType.INLINEDparameters:
 1, 'A', null
 - Specified by:
- paramTypein interface- Context<RenderContext>
 
- As 
 - 
paramTypeRenderContext paramType(ParamType paramType) Set the new context value forparamType().- Specified by:
- paramTypein interface- Context<RenderContext>
 
 - 
castModeRenderContext.CastMode castMode() The currently applied cast mode for bind values.- Specified by:
- castModein interface- Context<RenderContext>
 
 - 
castModeRenderContext castMode(RenderContext.CastMode mode) Set the new cast mode forcastMode().- Specified by:
- castModein interface- Context<RenderContext>
 
 - 
cast@Deprecated Boolean cast() Deprecated.- [#3703] - 3.5.0 - Do not use this any longerWhether casting must be applied. The result follows this logic:CastMode result ALWAYStrueNEVERfalseSOMEtrueorfalsedepending on the dialectDEFAULTnull- Specified by:
- castin interface- Context<RenderContext>
 
 - 
castModeSome@Deprecated RenderContext castModeSome(SQLDialect... dialects) Deprecated.- [#3703] - 3.5.0 - Do not use this any longerSet the new cast mode toRenderContext.CastMode.SOMEfor a list of dialects.- Specified by:
- castModeSomein interface- Context<RenderContext>
 
 
- 
 
-