congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RenderContext.formatNewLine
Code IndexAdd Tabnine 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)

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

  • Finding current android device location
  • getResourceAsStream (ClassLoader)
  • setRequestProperty (URLConnection)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Reference (javax.naming)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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