public class QueryContext extends Object
To obtain an instance of this class, invoke the method
CustomElementsUtil.getQueryContext()
Constructor and Description |
---|
QueryContext(String database,
String user,
Set<String> roles) |
Modifier and Type | Method and Description |
---|---|
String |
getCurrentDatabaseName()
Returns the name of the database where the query is executed
|
String |
getCurrentUserName()
Returns the name of the user who executes the query
|
Set<String> |
getCurrentUserRoles()
Returns the names of all the roles granted directly or indirectly to the user who executes the query.
Roles indirectly granted to the user are roles that have been granted to one of the roles of the user and not the user itself. |
public Set<String> getCurrentUserRoles()
Returns the names of all the roles granted directly or indirectly to the user who executes the query.
Roles indirectly granted to the user are roles that have been granted to one of the roles of the user and not the
user itself.
role1
, role2
is granted
to role1
and role3
is granted to role2
, this function will return a set
with role1
, role2
and role3
. The Set
is not sorted, so the
order is not guaranteed.Set
if the
user does not have any role assigned.public String getCurrentDatabaseName()
public String getCurrentUserName()
Copyright © 2023 Denodo Technologies. All rights reserved.