public String toString() { return "SUBSTITUTE(" + CalciteSqlDialect.DEFAULT.quoteStringLiteral(name) + ")"; } }
public String toString() { return "SUBSTITUTE(" + CalciteSqlDialect.DEFAULT.quoteStringLiteral(name) + ")"; } }
/** * Appends a string literal to this buffer. * * <p>For example, calling <code>literal("can't")</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; }
/** * Appends a string literal to this buffer. * * <p>For example, calling <code>literal("can't")</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; }
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")); }
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")); }
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")); }
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")); }