Codota Logo
RenderContext.formatNewLine
Code IndexAdd Codota to your IDE (free)

How to use
formatNewLine
method
in
org.jooq.RenderContext

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
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

.formatNewLine();
.formatNewLine();
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

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: com.ning.billing/killbill-osgi-bundles-analytics

context.sql("(")
    .formatIndentStart()
    .formatNewLine();
    .formatNewLine()
    .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.sql("(")
          .formatIndentStart()
          .formatNewLine()
          .visit(query)
          .formatIndentEnd()
          .formatNewLine()
          .sql(")");
    }
    else {
      context.sql("(")
          .subquery(true)
          .formatIndentStart()
          .formatNewLine()
          .visit(query)
          .formatIndentEnd()
          .formatNewLine()
          .subquery(false)
          .sql(")");
    }
  }
}
origin: org.jooq/jooq

    .formatNewLine();
  context.formatNewLine();
context.formatIndentEnd().formatNewLine();
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: org.jooq/jooq

.formatIndentStart(e1.indent)
.formatIndentStart()
.formatNewLine()
.visit(e1.joinNode.joinTree())
.formatNewLine()
.sql(')')
.render();
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 (size() > 0) {
    String separator = "";
    // [#989] Some dialects do not support qualified column references
    // in the UPDATE statement's SET clause
    // [#2055] Other dialects require qualified column references to
    // disambiguated columns in queries like
    // UPDATE t1 JOIN t2 .. SET t1.val = ..., t2.val = ...
    boolean restoreQualify = context.qualify();
    boolean supportsQualify = asList(POSTGRES, SQLITE).contains(context.configuration().dialect()) ? false : restoreQualify;
    for (Entry<Field<?>, Field<?>> entry : entrySet()) {
      context.sql(separator);
      if (!"".equals(separator)) {
        context.formatNewLine();
      }
      context.start(assignmentClause)
          .qualify(supportsQualify)
          .visit(entry.getKey())
          .qualify(restoreQualify)
          .sql(" = ")
          .visit(entry.getValue())
          .end(assignmentClause);
      separator = ", ";
    }
  }
  else {
    context.sql("[ no fields are updated ]");
  }
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

context.sql("(")
    .formatIndentStart()
    .formatNewLine();
    .formatNewLine()
    .sql(")");
break;
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

@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

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

  select(list(field("*"))).from(((Table<?>) wrapped).as(alias));
context.sql("(").formatIndentStart().formatNewLine()
    .visit(select).formatIndentEnd().formatNewLine()
    .sql(")");
  select(field("*")).from(((Table<?>) wrapped).as(alias)));
context.sql("(").formatIndentStart().formatNewLine()
    .visit(select).formatIndentEnd().formatNewLine()
    .sql(")");
origin: com.ning.billing/killbill-osgi-bundles-analytics

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

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

    .keyword("using").sql(" ")
    .formatIndentStart()
    .formatNewLine();
context.data(DATA_WRAP_DERIVED_TABLES_IN_PARENTHESES, true);
context.visit(using);
org.jooqRenderContextformatNewLine

Javadoc

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

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
  • formatIndentEnd
    Stop indenting subsequent SQL by a number of characters, if Settings#isRenderFormatted() is set to t
  • end,
  • formatIndentEnd,
  • formatIndentLockEnd,
  • formatIndentLockStart,
  • formatIndentStart,
  • formatSeparator,
  • keyword,
  • literal,
  • nextAlias

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • getApplicationContext (Context)
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • BoxLayout (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now