Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • A api
  • Project information
    • Project information
    • Activity
    • Members
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Wiki
    • Wiki
  • Activity
Collapse sidebar
  • ironapi
  • api
  • Wiki
  • Api
  • Queries
  • Query Search Options

Query Search Options · Changes

Page history
Update Query Search Options authored Nov 08, 2021 by Andrea Pavlovic's avatar Andrea Pavlovic
Show whitespace changes
Inline Side-by-side
API/Queries/Query-Search-Options.md
View page @ 60254fb8
...@@ -92,7 +92,9 @@ If a column on a big table is not indexed correctly, this search option will not ...@@ -92,7 +92,9 @@ If a column on a big table is not indexed correctly, this search option will not
# tsquery # 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 ```JSON
#/data/system/entity/query #/data/system/entity/query
...@@ -120,3 +122,35 @@ This is an extension for IronAPI. Does the left JSONB value contain the right JS ...@@ -120,3 +122,35 @@ This is an extension for IronAPI. Does the left JSONB value contain the right JS
"conds" : {"me.phonenumbers" : {"@>" : {"mobile": "+4354359"} } } "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
Clone repository
  • API
    • Available Endpoints
    • Changing Passwords
    • Form Input Types
    • Introduction
    • Logout
    • Plugins
    • Queries
    • Queries
      • Attributes
      • Context
      • Query Examples
      • Query Search Options
      • Referenced Instances
      • Saved Queries
    • Schema_Changes
    • Storing Files
View All Pages