Skip to content

Commit 3242d77

Browse files
committed
Update with more specific syntaxes
1 parent 457232c commit 3242d77

File tree

1 file changed

+16
-7
lines changed
  • src/app/docs/terminusdb-db-cli-querying

1 file changed

+16
-7
lines changed

src/app/docs/terminusdb-db-cli-querying/page.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,24 @@ Some additional notes:
7070
Or, to see the capabilities of all users, don't check for a specific user:
7171

7272
```bash
73-
./terminusdb query _system "select([User,Role,Scope],(
74-
t(Capability,rdf:type,'@schema':'Capability'),
75-
t(Capability,role,Role),
76-
t(Capability,scope,Scope),
77-
t(User,capability,Capability)
78-
))"
73+
./terminusdb query _system "select([User,Role,Scope],
74+
( t(Capability,rdf:type,'@schema':'Capability')
75+
, t(Capability,role,Role)
76+
, t(Capability,scope,Scope)
77+
, t(User,capability,Capability)
78+
)
79+
)"
7980
```
8081

82+
### Other special syntaxes
83+
84+
The command line is in essence a datalog prolog operating on the graph provided by TerminusDB and is excellent for solving small problems quickly.
85+
86+
* Instead of `lexical`, use `0^^xsd:unsignedInt`, or `0^^_`
87+
* Variables can either be specified with a capital initial character, like `Subject`, or using `v('subject')`
88+
* `once(...t()...)` is used to only get one answer
89+
* `_` is used to bind a variable to any value
90+
8191
### Graph Specifications, GRAPH_SPEC
8292

8393
To specify a graph to interact with, use the graph_spec before the query. Here are a couple of ways to specify a graph. The admin team is the default team on local TerminusDB instances.
@@ -86,4 +96,3 @@ To specify a graph to interact with, use the graph_spec before the query. Here a
8696
* `org/data_product`: main of a specific data product
8797
* `admin/data_product/local/branch/main` the main branch of the data product data_product in the admin organisation/team
8898
* `admin/data_product/local/commit/9w8hk3y6rb8tjdy961ed3i536ntkqd8` a specific commit in the data product data_product
89-

0 commit comments

Comments
 (0)