Tabnine Logo
ShowTables.getEscape
Code IndexAdd Tabnine to your IDE (free)

How to use
getEscape
method
in
com.facebook.presto.sql.tree.ShowTables

Best Java code snippets using com.facebook.presto.sql.tree.ShowTables.getEscape (Showing top 3 results out of 315)

origin: prestodb/presto

@Override
protected Void visitShowTables(ShowTables node, Integer context)
{
  builder.append("SHOW TABLES");
  node.getSchema().ifPresent(value ->
      builder.append(" FROM ")
          .append(formatName(value)));
  node.getLikePattern().ifPresent(value ->
      builder.append(" LIKE ")
          .append(formatStringLiteral(value)));
  node.getEscape().ifPresent(value ->
      builder.append(" ESCAPE ")
          .append(formatStringLiteral(value)));
  return null;
}
origin: prestodb/presto

@Override
protected Node visitShowTables(ShowTables showTables, Void context)
{
  CatalogSchemaName schema = createCatalogSchemaName(session, showTables, showTables.getSchema());
  accessControl.checkCanShowTablesMetadata(session.getRequiredTransactionId(), session.getIdentity(), schema);
  if (!metadata.catalogExists(session, schema.getCatalogName())) {
    throw new SemanticException(MISSING_CATALOG, showTables, "Catalog '%s' does not exist", schema.getCatalogName());
  }
  if (!metadata.schemaExists(session, schema)) {
    throw new SemanticException(MISSING_SCHEMA, showTables, "Schema '%s' does not exist", schema.getSchemaName());
  }
  Expression predicate = equal(identifier("table_schema"), new StringLiteral(schema.getSchemaName()));
  Optional<String> likePattern = showTables.getLikePattern();
  if (likePattern.isPresent()) {
    Expression likePredicate = new LikePredicate(
        identifier("table_name"),
        new StringLiteral(likePattern.get()),
        showTables.getEscape().map(StringLiteral::new));
    predicate = logicalAnd(predicate, likePredicate);
  }
  return simpleQuery(
      selectList(aliasedName("table_name", "Table")),
      from(schema.getCatalogName(), TABLE_TABLES),
      predicate,
      ordering(ascending("table_name")));
}
origin: com.facebook.presto/presto-parser

@Override
protected Void visitShowTables(ShowTables node, Integer context)
{
  builder.append("SHOW TABLES");
  node.getSchema().ifPresent(value ->
      builder.append(" FROM ")
          .append(formatName(value)));
  node.getLikePattern().ifPresent(value ->
      builder.append(" LIKE ")
          .append(formatStringLiteral(value)));
  node.getEscape().ifPresent(value ->
      builder.append(" ESCAPE ")
          .append(formatStringLiteral(value)));
  return null;
}
com.facebook.presto.sql.treeShowTablesgetEscape

Popular methods of ShowTables

  • getLikePattern
  • getSchema
  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top PhpStorm 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