Hub 2024.1 Help

Search Query Grammar

This page provides a BNF description for Hub query grammar.

Grammar

<Query> ::= <OrExpression> EOF <OrExpression> ::= <AndExpression> "or" <AndExpression> <AndExpression> ::= <SignExpression> "and" <SignExpression> <SignExpression> ::= ("not")? <Item> <Item> ::= <Field>| <Tuple>| <Paren>| <Phrase>| <Text> <Field> ::= <FieldName> ":" <FieldValue> <Tuple> ::= <TupleName> "(" <Field> <Field>* ")" <Paren> ::= "(" <OrExpression>| EOF ")"

Grammar is case-insensitive.

  • <Text> — an arbitrary text.

  • <Phrase> — the exact text phrase to match.

  • <FieldName> — a field name. For example, id, name, login, and so on. This covers all available JSON field names, plus a number of additional names like "is", "in", "has", and so on.

  • <FieldValue> — an attribute value. For example, admin, global, {myglobalpermission}. Enclose each value that contains several words separated with spaces in curly braces {}.

  • <Tuple> — conditional match by fields. For example, access(project: "myProject", with: "myRole").

Samples

Query

Description

name: admin

Returns all users with the visibleName "admin".

is: banned

Returns the list of all banned users.

access(project:MyProject, with:{ReadAuthModule})

Returns a list of users that can access the project "MyProject" with the permission "Read Auth Module".

Last modified: 17 June 2024