Codota Logo
SqlMonikerType
Code IndexAdd Codota to your IDE (free)

How to use
SqlMonikerType
in
org.apache.calcite.sql.validate

Best Java code snippets using org.apache.calcite.sql.validate.SqlMonikerType (Showing top 5 results out of 315)

  • Common ways to obtain SqlMonikerType
private void myMethod () {
SqlMonikerType s =
  • Codota IconSqlMoniker sqlMoniker;sqlMoniker.getType()
  • Smart code suggestions by Codota
}
origin: Qihoo360/Quicksql

 public SqlAdvisorHint(SqlMoniker id) {
  this.id = id.toString();
  final List<String> names = id.getFullyQualifiedNames();
  this.names = names == null
   ? null
   : names.toArray(new String[0]);
  type = id.getType().name();
 }
}
origin: Qihoo360/Quicksql

 public int compare(SqlMoniker o1, SqlMoniker o2) {
  int c = o1.getType().compareTo(o2.getType());
  if (c == 0) {
   c = listOrdering.compare(o1.getFullyQualifiedNames(),
     o2.getFullyQualifiedNames());
  }
  return c;
 }
};
origin: org.apache.calcite/calcite-core

 public int compare(SqlMoniker o1, SqlMoniker o2) {
  int c = o1.getType().compareTo(o2.getType());
  if (c == 0) {
   c = listOrdering.compare(o1.getFullyQualifiedNames(),
     o2.getFullyQualifiedNames());
  }
  return c;
 }
};
origin: org.apache.calcite/calcite-core

 public SqlAdvisorHint(SqlMoniker id) {
  this.id = id.toString();
  final List<String> names = id.getFullyQualifiedNames();
  this.names = names == null
   ? null
   : names.toArray(new String[0]);
  type = id.getType().name();
 }
}
origin: dremio/dremio-oss

/**
 * Builds the response object for query suggestions.
 *
 * @param suggestionList  The suggestion list returned from the SqlAdvisor.
 *
 * @return The built SuggestionResponse object or null if there are no suggestions.
 */
public SuggestionResponse buildSuggestionResponse(List<SqlMoniker> suggestionList) {
 // Return empty response in REST request
 if (suggestionList == null || suggestionList.isEmpty()) {
  return null;
 }
 // Create and populate suggestion response list
 List<SuggestionResponse.Suggestion> suggestions = new ArrayList<>();
 for (SqlMoniker hint : suggestionList) {
  // Quote the identifiers if they are not keywords or functions,
  // and are required to be quoted.
  List<String> qualifiedNames = hint.getFullyQualifiedNames();
  if ((hint.getType() != SqlMonikerType.KEYWORD) && (hint.getType() != SqlMonikerType.FUNCTION)) {
   qualifiedNames = qualifiedNames.stream().map(name -> quoteIdentifier(name)).collect(Collectors.toList());
  }
  suggestions.add(
   new SuggestionResponse.Suggestion(Joiner.on(".").join(qualifiedNames),hint.getType().name()));
 }
 SuggestionResponse response = new SuggestionResponse(suggestions);
 return response;
}
org.apache.calcite.sql.validateSqlMonikerType

Javadoc

An enumeration of moniker types.

Used in SqlMoniker.

Most used methods

  • name
  • compareTo

Popular in Java

  • Updating database using SQL prepared statement
  • getApplicationContext (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • getContentResolver (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Notification (javax.management)
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