Role
This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics. |
Role( name, [database] )
Description
The Role
function returns a Reference for the specified
user-defined role’s name
in the specified child database
. If a child
database
is not specified, the role returned belongs to the current
database.
Parameters
Parameter | Type | Definition and requirements |
---|---|---|
|
String |
The name of a role. |
|
Reference |
Optional - A Reference to a child database. If not specified, the current database is used. |
Returns
A Reference to a user-defined role with the specified name
, in the
specified child database
(or the current database if database
is not
specified).
Examples
-
The following query gets a Reference to the user-defined role named "admin" in the current database:
Role("admin")
-
The following query gets a Reference to the user-defined role named "admin" in a child database named "child_db":
Role("admin", Database("child_db"))