use of io.crate.sql.tree.RevokePrivilege in project crate by crate.
the class TestStatementBuilder method printStatement.
private static void printStatement(String sql) {
println(sql.trim());
println("");
Statement statement = SqlParser.createStatement(sql);
println(statement.toString());
println("");
// TODO: support formatting all statement types
if (statement instanceof Query || statement instanceof CreateTable || statement instanceof CopyFrom || statement instanceof SwapTable || statement instanceof GCDanglingArtifacts || statement instanceof CreateFunction || statement instanceof CreateUser || statement instanceof GrantPrivilege || statement instanceof DenyPrivilege || statement instanceof RevokePrivilege || statement instanceof DropUser || statement instanceof DropAnalyzer || statement instanceof DropFunction || statement instanceof DropTable || statement instanceof DropBlobTable || statement instanceof DropView || statement instanceof DropRepository || statement instanceof DropSnapshot || statement instanceof Update || statement instanceof Insert || statement instanceof SetSessionAuthorizationStatement || statement instanceof Window) {
println(SqlFormatter.formatSql(statement));
println("");
assertFormattedSql(statement);
}
println("=".repeat(60));
println("");
}
Aggregations