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

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

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

origin: Qihoo360/Quicksql

 public String toString() {
  return "SUBSTITUTE("
    + CalciteSqlDialect.DEFAULT.quoteStringLiteral(name)
    + ")";
 }
}
origin: org.apache.calcite/calcite-core

 public String toString() {
  return "SUBSTITUTE("
    + CalciteSqlDialect.DEFAULT.quoteStringLiteral(name)
    + ")";
 }
}
origin: org.apache.calcite/calcite-core

/**
 * Appends a string literal to this buffer.
 *
 * <p>For example, calling <code>literal(&quot;can't&quot;)</code>
 * would convert the buffer
 * <blockquote><code>SELECT </code></blockquote>
 * to
 * <blockquote><code>SELECT 'can''t'</code></blockquote>
 *
 * @param s String to append
 * @return This buffer
 */
public SqlBuilder literal(String s) {
 buf.append(
   s == null
     ? "null"
     : dialect.quoteStringLiteral(s));
 return this;
}
origin: Qihoo360/Quicksql

/**
 * Appends a string literal to this buffer.
 *
 * <p>For example, calling <code>literal(&quot;can't&quot;)</code>
 * would convert the buffer
 * <blockquote><code>SELECT </code></blockquote>
 * to
 * <blockquote><code>SELECT 'can''t'</code></blockquote>
 *
 * @param s String to append
 * @return This buffer
 */
public SqlBuilder literal(String s) {
 buf.append(
   s == null
     ? "null"
     : dialect.quoteStringLiteral(s));
 return this;
}
origin: Qihoo360/Quicksql

public static TranslatableTable str(Object o, Object p) {
 assertThat(RexLiteral.validConstant(o, Litmus.THROW), is(true));
 assertThat(RexLiteral.validConstant(p, Litmus.THROW), is(true));
 return new ViewTable(Object.class, typeFactory ->
   typeFactory.builder().add("c", SqlTypeName.VARCHAR, 100).build(),
   "values " + CalciteSqlDialect.DEFAULT.quoteStringLiteral(o.toString())
     + ", " + CalciteSqlDialect.DEFAULT.quoteStringLiteral(p.toString()),
   ImmutableList.of(), Arrays.asList("view"));
}
origin: org.apache.calcite/calcite-core

public static TranslatableTable str(Object o, Object p) {
 assertThat(RexLiteral.validConstant(o, Litmus.THROW), is(true));
 assertThat(RexLiteral.validConstant(p, Litmus.THROW), is(true));
 return new ViewTable(Object.class, typeFactory ->
   typeFactory.builder().add("c", SqlTypeName.VARCHAR, 100).build(),
   "values " + CalciteSqlDialect.DEFAULT.quoteStringLiteral(o.toString())
     + ", " + CalciteSqlDialect.DEFAULT.quoteStringLiteral(p.toString()),
   ImmutableList.of(), Arrays.asList("view"));
}
origin: Qihoo360/Quicksql

public static TranslatableTable strView(String s) {
 return new ViewTable(Object.class, typeFactory ->
   typeFactory.builder().add("c", SqlTypeName.VARCHAR, 100).build(),
   "values (" + CalciteSqlDialect.DEFAULT.quoteStringLiteral(s) + ")",
   ImmutableList.of(), Arrays.asList("view"));
}
origin: org.apache.calcite/calcite-core

public static TranslatableTable strView(String s) {
 return new ViewTable(Object.class, typeFactory ->
   typeFactory.builder().add("c", SqlTypeName.VARCHAR, 100).build(),
   "values (" + CalciteSqlDialect.DEFAULT.quoteStringLiteral(s) + ")",
   ImmutableList.of(), Arrays.asList("view"));
}
org.apache.calcite.sqlSqlDialectquoteStringLiteral

Javadoc

Converts a string into a string literal. For example, can't run becomes 'can''t run'.

Popular methods of SqlDialect

  • 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
  • emulateNullDirection
    Returns the SqlNode for emulating the null direction for the given field or null if no emulation ne
  • 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

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • setContentView (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • CodeWhisperer alternatives
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