Create Cache objects inside your model.
Core concepts:
Functions
tab under
Logic
.
cache:
string:
job: integer
root: string
hide: [ string, ... ]
show: [ string, ... ]
sort: : [ {"key": string, "reverse": boolean}, ...]
filter: [ {"key": string, "value": string}, ...]
paginate: [ integer, integer ]
| Key | Required | Type | Default | Description |
|---|---|---|---|---|
| job | Yes | integer | Null | The id of the job you want to perform. |
| root | No | string | - | Easily skip data by selecting the root node of your returned data. |
| hide | No | list of string(s) | - | The key(s) that need to be hidden, dot notation is used to traverse into objects. |
| show | No | list of string(s) | - | The key(s) that need to be shown, dot notation is used to traverse into objects. |
| Sort | No | list of tuples | - | Keys to sort on, first part of tuple specifies the key, second a boolean that can reverse sorting direction. |
| filter | No | list of tuples | - | Tuples to filter on, first part being the key, second the filter value. |
| paginate | No | list of integers | - | Tuple of page size and page offset. |
cache:
GetCustomer:
job: 2
root: "data.Customer"
hide: ["Discounts"]
paginate: [10, 0]
cache:
GetCustomers:
job: 2
root: "data.Customer"
hide: ["Discounts"]
paginate: [10, 0]
GetItems:
job: 3
root: "data.Item"
show: ["Name", "Price"]
paginate: [10, 0]