Search in sources :

Example 1 with ShowRoles

use of com.facebook.presto.sql.tree.ShowRoles in project presto by prestodb.

the class TestSqlParser method testShowRoles.

@Test
public void testShowRoles() throws Exception {
    assertStatement("SHOW ROLES", new ShowRoles(Optional.empty(), false));
    assertStatement("SHOW ROLES FROM foo", new ShowRoles(Optional.of(new Identifier("foo")), false));
    assertStatement("SHOW ROLES IN foo", new ShowRoles(Optional.of(new Identifier("foo")), false));
    assertStatement("SHOW CURRENT ROLES", new ShowRoles(Optional.empty(), true));
    assertStatement("SHOW CURRENT ROLES FROM foo", new ShowRoles(Optional.of(new Identifier("foo")), true));
    assertStatement("SHOW CURRENT ROLES IN foo", new ShowRoles(Optional.of(new Identifier("foo")), true));
}
Also used : Identifier(com.facebook.presto.sql.tree.Identifier) QueryUtil.quotedIdentifier(com.facebook.presto.sql.QueryUtil.quotedIdentifier) ShowRoles(com.facebook.presto.sql.tree.ShowRoles) Test(org.testng.annotations.Test)

Aggregations

QueryUtil.quotedIdentifier (com.facebook.presto.sql.QueryUtil.quotedIdentifier)1 Identifier (com.facebook.presto.sql.tree.Identifier)1 ShowRoles (com.facebook.presto.sql.tree.ShowRoles)1 Test (org.testng.annotations.Test)1