Tabnine Logo
SqlDialect.emulateNullDirection
Code IndexAdd Tabnine to your IDE (free)

How to use
emulateNullDirection
method
in
org.apache.calcite.sql.SqlDialect

Best Java code snippets using org.apache.calcite.sql.SqlDialect.emulateNullDirection (Showing top 4 results out of 315)

origin: Qihoo360/Quicksql

public void addOrderItem(List<SqlNode> orderByList,
  RelFieldCollation field) {
 if (field.nullDirection != RelFieldCollation.NullDirection.UNSPECIFIED) {
  boolean first = field.nullDirection == RelFieldCollation.NullDirection.FIRST;
  SqlNode nullDirectionNode =
    dialect.emulateNullDirection(context.field(field.getFieldIndex()),
      first, field.direction.isDescending());
  if (nullDirectionNode != null) {
   orderByList.add(nullDirectionNode);
   field = new RelFieldCollation(field.getFieldIndex(),
     field.getDirection(),
     RelFieldCollation.NullDirection.UNSPECIFIED);
  }
 }
 orderByList.add(context.toSql(field));
}
origin: org.apache.calcite/calcite-core

void addOrderItem(List<SqlNode> orderByList, RelFieldCollation field) {
 if (field.nullDirection != RelFieldCollation.NullDirection.UNSPECIFIED) {
  final boolean first =
    field.nullDirection == RelFieldCollation.NullDirection.FIRST;
  SqlNode nullDirectionNode =
    dialect.emulateNullDirection(field(field.getFieldIndex()),
      first, field.direction.isDescending());
  if (nullDirectionNode != null) {
   orderByList.add(nullDirectionNode);
   field = new RelFieldCollation(field.getFieldIndex(),
     field.getDirection(),
     RelFieldCollation.NullDirection.UNSPECIFIED);
  }
 }
 orderByList.add(toSql(field));
}
origin: Qihoo360/Quicksql

boolean first = fc.nullDirection == RelFieldCollation.NullDirection.FIRST;
SqlNode nullDirectionNode =
  dialect.emulateNullDirection(context.field(fc.getFieldIndex()),
    first, fc.direction.isDescending());
if (nullDirectionNode != null) {
origin: org.apache.calcite/calcite-core

boolean first = fc.nullDirection == RelFieldCollation.NullDirection.FIRST;
SqlNode nullDirectionNode =
  dialect.emulateNullDirection(context.field(fc.getFieldIndex()),
    first, fc.direction.isDescending());
if (nullDirectionNode != null) {
org.apache.calcite.sqlSqlDialectemulateNullDirection

Javadoc

Returns the SqlNode for emulating the null direction for the given field or null if no emulation needs to be done.

Popular methods of SqlDialect

  • quoteStringLiteral
    Converts a string into a string literal. For example, can't run becomes 'can''t run'.
  • unparseCall
  • <init>
    Creates a SqlDialect.
  • quoteIdentifier
    Quotes a multi-part identifier.
  • supportsAggregateFunction
  • supportsCharSet
    Returns whether the dialect supports character set names as part of a data type, for instance VARCHA
  • allowsAs
  • containsNonAscii
    Returns whether the string contains any characters outside the comfortable 7-bit ASCII range (32 thr
  • defaultNullDirection
    Returns whether NULL values are sorted first or last, in this dialect, in an ORDER BY item of a give
  • getCalendarPolicy
  • getCastSpec
  • getDatabaseProduct
    Returns the database this dialect belongs to, SqlDialect.DatabaseProduct#UNKNOWN if not known, never
  • getCastSpec,
  • getDatabaseProduct,
  • getNullCollation,
  • hasImplicitTableAlias,
  • identifierNeedsToBeQuoted,
  • quoteStringLiteralUnicode,
  • quoteTimestampLiteral,
  • rewriteSingleValueExpr,
  • supportsAliasedValues

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • onCreateOptionsMenu (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • JLabel (javax.swing)
  • Top Sublime Text plugins
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