| ... | ... | @@ -92,7 +92,9 @@ If a column on a big table is not indexed correctly, this search option will not |
|
|
|
|
|
|
|
# tsquery
|
|
|
|
|
|
|
|
This is an extension for IronAPI. The attrs are just for reference, they are not needed for the search query!
|
|
|
|
This is an extension for IronAPI.
|
|
|
|
|
|
|
|
The attrs are just for reference, they are not needed for the search query!
|
|
|
|
|
|
|
|
```JSON
|
|
|
|
#/data/system/entity/query
|
| ... | ... | @@ -120,3 +122,35 @@ This is an extension for IronAPI. Does the left JSONB value contain the right JS |
|
|
|
"conds" : {"me.phonenumbers" : {"@>" : {"mobile": "+4354359"} } }
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
# Subtree
|
|
|
|
|
|
|
|
This is an extension for IronAPI.
|
|
|
|
|
|
|
|
For entities which represent a tree structure ("isTree": true in the universe), a search for a subtree of an element possible. The following will return all entries of the current entity which are "under" id 1, i.e. have either "1" or any of it's (children's) children as their parent:
|
|
|
|
|
|
|
|
```JSON
|
|
|
|
{
|
|
|
|
"conds": {"me.id": {"-subtree": [1] }
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
The search may be limited to a certain depth, in this example it's "2", so only the main entry (with id "1") and it's direct children will be returned:
|
|
|
|
|
|
|
|
|
|
|
|
```JSON
|
|
|
|
{
|
|
|
|
"conds": {"me.id": {"-subtree": [1, 2] }
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
It can be combined with other search options, like this for example:
|
|
|
|
|
|
|
|
```JSON
|
|
|
|
{
|
|
|
|
"conds": [
|
|
|
|
{"me.id": {"-subtree": [1,2]}},
|
|
|
|
{"me.name" : {"-ilike" : "%a%"}}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
``` |
|
|
\ No newline at end of file |