Roles
Roles( [database] )
Roles( )
ScopedRole( name, database )
Roles( [database] )
Roles( [database] )
roles( [database] )
Roles( [database] )
Description
The Roles
function, when executed with Paginate
, returns
an Array of References for user-defined roles in the specified
child database
. If a child database
is not specified, the role
references returned all belong to the current database.
When a child Also, Go does not support optional function parameters, nor function
overloading. To specify a child |
Parameters
Parameter | Type | Definition and requirements |
---|---|---|
|
Optional - A Reference to a child database. If not specified, the current database is used. A Reference to a child database. Optional - A Reference to a child database. If not specified, the current database is used. Optional - A Reference to a child database. If not specified, the current database is used. Optional - A Reference to a child database. If not specified, the current database is used. Optional - A Reference to a child database. If not specified, the current database is used. Optional - A Reference to a child database. If not specified, the current database is used. |
Examples
-
The following query lists any user-defined roles (up to the pagination limit) in the current database:
ObjectV(data: Arr(RefV(id = "employees", collection = RefV(id = "roles"))))
map[data:[{employees 0xc00017e0c0 0xc00017e0c0 <nil>}]]
{data: [ref(id = "employees", collection = ref(id = "roles"))]}
{ data: [ Role("employees") ] }
{'data': [Ref(id=employees, collection=Ref(id=roles))]}
{ data: [ Role("employees") ] }
-
The following query lists the References for any user-defined roles (up to the pagination limit) in a child database named "child_db":
ObjectV(data: Arr())
map[data:[]]
{data: []}
{ data: [] }
{'data': []}
{ data: [] }
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!