Search in sources :

Example 1 with ShowRoles

use of io.prestosql.sql.tree.ShowRoles in project hetu-core by openlookeng.

the class TestSqlParser method testShowRoles.

@Test
public void testShowRoles() {
    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(io.prestosql.sql.tree.Identifier) QueryUtil.quotedIdentifier(io.prestosql.sql.QueryUtil.quotedIdentifier) ShowRoles(io.prestosql.sql.tree.ShowRoles) Test(org.testng.annotations.Test)

Aggregations

QueryUtil.quotedIdentifier (io.prestosql.sql.QueryUtil.quotedIdentifier)1 Identifier (io.prestosql.sql.tree.Identifier)1 ShowRoles (io.prestosql.sql.tree.ShowRoles)1 Test (org.testng.annotations.Test)1