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

How to use
declareTables
method
in
org.jooq.RenderContext

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

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

DefaultRenderContext(RenderContext context) {
  this(context.configuration());
  paramType(context.paramType());
  qualify(context.qualify());
  castMode(context.castMode());
  declareFields(context.declareFields());
  declareTables(context.declareTables());
  data().putAll(context.data());
}
origin: org.jooq/jooq

.dsl()
.renderContext()
.declareTables(true)
.sql('(')
.formatIndentStart(e1.indent)
origin: com.ning.billing/killbill-osgi-bundles-analytics

@Override
public final void toSQL(RenderContext context) {
  boolean declare = context.declareTables();
  context.start(DELETE_DELETE)
      .keyword("delete").sql(" ");
  // [#2464] MySQL supports a peculiar multi-table DELETE syntax for aliased tables:
  // DELETE t1 FROM my_table AS t1
  if (asList(MARIADB, MYSQL).contains(context.configuration().dialect())) {
    // [#2579] TODO: Improve Table API to discover aliased tables more
    // reliably instead of resorting to instanceof:
    if (getFrom() instanceof TableAlias ||
      (getFrom() instanceof TableImpl && ((TableImpl<R>)getFrom()).getAliasedTable() != null)) {
      context.visit(getFrom())
          .sql(" ");
    }
  }
  context.keyword("from").sql(" ")
      .declareTables(true)
      .visit(getFrom())
      .declareTables(declare)
      .end(DELETE_DELETE)
      .start(DELETE_WHERE);
  if (!(getWhere() instanceof TrueCondition)) {
    context.formatSeparator()
        .keyword("where").sql(" ")
        .visit(getWhere());
  }
  context.end(DELETE_WHERE);
}
origin: perfectsense/dari

/**
 * Creates an instance that can translate the given {@code query}
 * with the given {@code database}.
 */
public SqlQuery(AbstractSqlDatabase database, Query<?> query, String aliasPrefix) {
  this.database = database;
  this.query = query;
  this.aliasPrefix = aliasPrefix;
  dslContext = DSL.using(database.getDialect());
  tableRenderContext = dslContext.renderContext().paramType(ParamType.INLINED).declareTables(true);
  renderContext = dslContext.renderContext().paramType(ParamType.INLINED);
  recordTableAlias = aliasPrefix + "r";
  recordTable = DSL.table(DSL.name(database.recordTable.getName())).as(recordTableAlias);
  recordIdField = DSL.field(DSL.name(recordTableAlias, database.recordIdField.getName()), database.uuidType());
  recordTypeIdField = DSL.field(DSL.name(recordTableAlias, database.recordTypeIdField.getName()), database.uuidType());
  mappedKeys = query.mapEmbeddedKeys(database.getEnvironment());
  selectedIndexes = new HashMap<>();
  for (Map.Entry<String, Query.MappedKey> entry : mappedKeys.entrySet()) {
    selectIndex(entry.getKey(), entry.getValue());
  }
}
origin: org.jooq/jooq

DefaultRenderContext(RenderContext context) {
  this(context.configuration());
  paramType(context.paramType());
  qualifyCatalog(context.qualifyCatalog());
  qualifySchema(context.qualifySchema());
  quote(context.quote());
  castMode(context.castMode());
  data().putAll(context.data());
  declareCTE = context.declareCTE();
  declareWindows = context.declareWindows();
  declareFields = context.declareFields();
  declareTables = context.declareTables();
  declareAliases = context.declareAliases();
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

@Override
public final void toSQL(RenderContext context) {
  if (alias != null) {
    alias.toSQL(context);
  }
  else {
    if (context.qualify()) {
      Schema mappedSchema = Utils.getMappedSchema(context.configuration(), getSchema());
      if (mappedSchema != null) {
        context.visit(mappedSchema);
        context.sql(".");
      }
    }
    context.literal(Utils.getMappedTable(context.configuration(), this).getName());
    if (parameters != null && context.declareTables()) {
      context.sql("(")
          .visit(new QueryPartList<Field<?>>(parameters))
          .sql(")");
    }
  }
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

@Override
public final void toSQL(RenderContext context) {
  if (context.declareFields() || context.declareTables()) {
    SQLDialect dialect = context.configuration().dialect();
    boolean simulateDerivedColumnList = false;
          if (context.declareTables() && o instanceof ArrayTable) {
            ArrayTable table = (ArrayTable) o;
origin: com.ning.billing/killbill-osgi-bundles-analytics

private final void toSQLStandard(RenderContext context) {
  context.start(MERGE_MERGE_INTO)
      .keyword("merge into").sql(" ")
      .declareTables(true)
      .visit(table)
      .declareTables(false)
      .end(MERGE_MERGE_INTO)
      .formatSeparator()
      .start(MERGE_USING)
      .declareTables(true)
      .keyword("using").sql(" ")
      .formatIndentStart()
  context.data(DATA_WRAP_DERIVED_TABLES_IN_PARENTHESES, null);
  context.formatIndentEnd()
      .declareTables(false);
origin: com.ning.billing/killbill-osgi-bundles-analytics

private final void toSQLH2(RenderContext context) {
  context.keyword("merge into")
      .sql(" ")
      .declareTables(true)
      .visit(table)
      .formatSeparator();
  context.sql("(");
  Utils.fieldNames(context, getH2Fields());
  context.sql(")");
  if (!getH2Keys().isEmpty()) {
    context.sql(" ").keyword("key").sql(" (");
    Utils.fieldNames(context, getH2Keys());
    context.sql(")");
  }
  if (h2Select != null) {
    context.sql(" ")
        .visit(h2Select);
  }
  else {
    context.sql(" ").keyword("values").sql(" (")
        .visit(getH2Values())
        .sql(")");
  }
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

.keyword("update")
.sql(" ")
.declareTables(true)
.visit(getInto())
.declareTables(false)
.end(UPDATE_UPDATE);
origin: com.ning.billing/killbill-osgi-bundles-analytics

    .declareTables(true);
context.declareTables(false)
    .end(SELECT_FROM);
org.jooqRenderContextdeclareTables

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
  • 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
  • formatIndentLockEnd
    Stop indenting subsequent SQL at the same level as the current line, if Settings#isRenderFormatted()
  • formatIndentEnd,
  • formatIndentLockEnd,
  • formatIndentLockStart,
  • formatIndentStart,
  • formatNewLine,
  • formatSeparator,
  • keyword,
  • literal,
  • nextAlias

Popular in Java

  • Making http post requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • PhpStorm for WordPress
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