本文整理汇总了Java中com.facebook.presto.sql.tree.ShowCatalogs类的典型用法代码示例。如果您正苦于以下问题:Java ShowCatalogs类的具体用法?Java ShowCatalogs怎么用?Java ShowCatalogs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ShowCatalogs类属于com.facebook.presto.sql.tree包,在下文中一共展示了ShowCatalogs类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitShowCatalogs
import com.facebook.presto.sql.tree.ShowCatalogs; //导入依赖的package包/类
@Override
protected Void visitShowCatalogs(ShowCatalogs node, Integer context)
{
builder.append("SHOW CATALOGS");
node.getLikePattern().ifPresent((value) ->
builder.append(" LIKE ")
.append(formatStringLiteral(value)));
return null;
}
示例2: visitShowCatalogs
import com.facebook.presto.sql.tree.ShowCatalogs; //导入依赖的package包/类
@Override
protected RelationType visitShowCatalogs(ShowCatalogs node, AnalysisContext context)
{
List<Expression> rows = metadata.getCatalogNames().keySet().stream()
.map(name -> row(new StringLiteral(name)))
.collect(toList());
Query query = simpleQuery(
selectList(new AllColumns()),
aliased(new Values(rows), "catalogs", ImmutableList.of("Catalog")));
return process(query, context);
}
示例3: visitShowCatalogs
import com.facebook.presto.sql.tree.ShowCatalogs; //导入依赖的package包/类
@Override
protected Void visitShowCatalogs(ShowCatalogs node, Integer context)
{
builder.append("SHOW CATALOGS");
return null;
}
示例4: visitShowCatalogs
import com.facebook.presto.sql.tree.ShowCatalogs; //导入依赖的package包/类
@Override
public Node visitShowCatalogs(SqlBaseParser.ShowCatalogsContext context)
{
return new ShowCatalogs(getLocation(context));
}
示例5: testShowCatalogs
import com.facebook.presto.sql.tree.ShowCatalogs; //导入依赖的package包/类
@Test
public void testShowCatalogs()
throws Exception
{
assertStatement("SHOW CATALOGS", new ShowCatalogs());
}