Tabnine Logo
RenderContext.formatIndentEnd
Code IndexAdd Tabnine to your IDE (free)

How to use
formatIndentEnd
method
in
org.jooq.RenderContext

Best Java code snippets using org.jooq.RenderContext.formatIndentEnd (Showing top 20 results out of 315)

origin: com.ning.billing/killbill-osgi-bundles-analytics

private final void wrappingParenthesis(RenderContext context, String parenthesis) {
  switch (context.configuration().dialect()) {
    // Sybase ASE, Derby, Firebird and SQLite have some syntax issues with unions.
    // Check out https://issues.apache.org/jira/browse/DERBY-2374
    /* [pro] xx
    xxxx xxxxxxx
    xxxx xxxx
    xx [/pro] */
    case DERBY:
    case FIREBIRD:
    case SQLITE:
    // [#288] MySQL has a very special way of dealing with UNION's
    // So include it as well
    case MARIADB:
    case MYSQL:
      return;
  }
  if (")".equals(parenthesis)) {
    context.formatIndentEnd()
        .formatNewLine();
  }
  context.sql(parenthesis);
  if ("(".equals(parenthesis)) {
    context.formatIndentStart()
        .formatNewLine();
  }
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

context.formatIndentEnd()
    .formatNewLine()
    .sql(")");
origin: com.ning.billing/killbill-osgi-bundles-analytics

private void toSQLTable(RenderContext context, Table<?> table) {
  // [#671] Some databases formally require nested JOINS on the right hand
  // side of the join expression to be wrapped in parentheses (e.g. MySQL).
  // In other databases, it's a good idea to wrap them all
  boolean wrap = table instanceof JoinTable &&
    (table == rhs || asList().contains(context.configuration().dialect().family()));
  if (wrap) {
    context.sql("(")
        .formatIndentStart()
        .formatNewLine();
  }
  context.visit(table);
  if (wrap) {
    context.formatIndentEnd()
        .formatNewLine()
        .sql(")");
  }
}
origin: org.jooq/jooq

context.formatIndentEnd().formatNewLine();
origin: com.ning.billing/killbill-osgi-bundles-analytics

@Override
public final void toSQL(RenderContext context) {
  // If this is already a subquery, proceed
  if (context.subquery()) {
    context.formatIndentStart()
        .formatNewLine()
        .visit(query)
        .formatIndentEnd()
        .formatNewLine();
  }
  else {
    context.subquery(true)
        .formatIndentStart()
        .formatNewLine()
        .visit(query)
        .formatIndentEnd()
        .formatNewLine()
        .subquery(false);
  }
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

context.formatIndentEnd()
    .formatNewLine()
    .sql(")");
origin: com.ning.billing/killbill-osgi-bundles-analytics

context.formatIndentEnd()
    .formatNewLine();
origin: com.ning.billing/killbill-osgi-bundles-analytics

  @Override
  public final void toSQL(RenderContext context) {

    // If this is already a subquery, proceed
    if (context.subquery()) {
      context.sql("(")
          .formatIndentStart()
          .formatNewLine()
          .visit(query)
          .formatIndentEnd()
          .formatNewLine()
          .sql(")");
    }
    else {
      context.sql("(")
          .subquery(true)
          .formatIndentStart()
          .formatNewLine()
          .visit(query)
          .formatIndentEnd()
          .formatNewLine()
          .subquery(false)
          .sql(")");
    }
  }
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

context.formatIndentEnd();
origin: com.ning.billing/killbill-osgi-bundles-analytics

@Override
public final void toSQL(RenderContext context) {
  boolean indent = (size() > 1);
  context.sql("(");
  if (indent) {
    context.formatIndentStart();
  }
  String separator = "";
  for (Field<?> field : values()) {
    context.sql(separator);
    if (indent) {
      context.formatNewLine();
    }
    context.visit(field);
    separator = ", ";
  }
  if (indent) {
    context.formatIndentEnd()
        .formatNewLine();
  }
  context.sql(")");
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

@Override
public final void toSQL(RenderContext context) {
  // If this is already a subquery, proceed
  if (context.subquery()) {
    context.keyword(operator.toSQL())
        .sql(" (")
        .formatIndentStart()
        .formatNewLine()
        .visit(query)
        .formatIndentEnd()
        .formatNewLine()
        .sql(")");
  }
  else {
    context.keyword(operator.toSQL())
        .sql(" (")
        .subquery(true)
        .formatIndentStart()
        .formatNewLine()
        .visit(query)
        .formatIndentEnd()
        .formatNewLine()
        .subquery(false)
        .sql(")");
  }
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

@Override
public final void toSQL(RenderContext context) {
  // If this is already a subquery, proceed
  if (context.subquery()) {
    context.visit(field)
        .sql(" ")
        .keyword(comparator.toSQL())
        .sql(" (")
        .formatIndentStart()
        .formatNewLine()
        .visit(query)
        .formatIndentEnd()
        .formatNewLine()
        .sql(")");
  }
  else {
    context.visit(field)
        .sql(" ")
        .keyword(comparator.toSQL())
        .sql(" (")
        .subquery(true)
        .formatIndentStart()
        .formatNewLine()
        .visit(query)
        .formatIndentEnd()
        .formatNewLine()
        .subquery(false)
        .sql(")");
  }
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

@Override
public final void toSQL(RenderContext ctx) {
  // If this is already a subquery, proceed
  if (ctx.subquery()) {
    ctx.keyword(quantifier.toSQL())
      .sql(" (")
      .formatIndentStart()
      .formatNewLine()
      .visit(delegate(ctx.configuration()))
      .formatIndentEnd()
      .formatNewLine()
      .sql(")");
  }
  else {
    ctx.keyword(quantifier.toSQL())
      .sql(" (")
      .subquery(true)
      .formatIndentStart()
      .formatNewLine()
      .visit(delegate(ctx.configuration()))
      .formatIndentEnd()
      .formatNewLine()
      .subquery(false)
      .sql(")");
  }
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

final void toSQLReferenceKeys(RenderContext context) {
  boolean indent = (size() > 1);
  context.sql("(");
  if (indent) {
    context.formatIndentStart();
  }
  // [#989] Avoid qualifying fields in INSERT field declaration
  boolean qualify = context.qualify();
  context.qualify(false);
  String separator = "";
  for (Field<?> field : keySet()) {
    context.sql(separator);
    if (indent) {
      context.formatNewLine();
    }
    context.visit(field);
    separator = ", ";
  }
  context.qualify(qualify);
  if (indent) {
    context.formatIndentEnd()
        .formatNewLine();
  }
  context.sql(")");
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

.formatIndentEnd();
origin: com.ning.billing/killbill-osgi-bundles-analytics

.visit(select).formatIndentEnd().formatNewLine()
.sql(")");
.visit(select).formatIndentEnd().formatNewLine()
.sql(")");
origin: com.ning.billing/killbill-osgi-bundles-analytics

    .visit(selects)
    .subquery(subquery)
    .formatIndentEnd()
    .formatNewLine();
break;
origin: com.ning.billing/killbill-osgi-bundles-analytics

.formatSeparator()
.visit(limitOffsetRownumber)
.formatIndentEnd()
.paramType(paramType);
origin: com.ning.billing/killbill-osgi-bundles-analytics

.visit(select)
.subquery(false)
.formatIndentEnd()
.formatNewLine()
.sql(")");
origin: com.ning.billing/killbill-osgi-bundles-analytics

context.visit(using);
context.data(DATA_WRAP_DERIVED_TABLES_IN_PARENTHESES, null);
context.formatIndentEnd()
    .declareTables(false);
org.jooqRenderContextformatIndentEnd

Javadoc

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

Popular methods of RenderContext

  • sql
    Recurse rendering.
  • visit
  • render
    Render a query part in a new context derived from this one. The rendered SQL will not be appended to
  • declareTables
  • paramType
    Set the new context value for #paramType().
  • castMode
    Set the new cast mode for #castMode().
  • configuration
  • data
  • declareFields
  • declareWindows
  • end
  • formatIndentLockEnd
    Stop indenting subsequent SQL at the same level as the current line, if Settings#isRenderFormatted()
  • end,
  • formatIndentLockEnd,
  • formatIndentLockStart,
  • formatIndentStart,
  • formatNewLine,
  • formatSeparator,
  • keyword,
  • literal,
  • nextAlias

Popular in Java

  • Updating database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • JTable (javax.swing)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now