Skip to content

Commit b5f0df4

Browse files
committed
Attributes
1 parent d9da987 commit b5f0df4

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

pages/features/properties.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,49 @@ Data can be transferred to KeystoneDB in a variety of formats. The following are
1616
- `IntSet` - A unique set of integers
1717
- `StringSet` - A unique set of strings
1818
- `Bytes` - Raw bytes
19+
20+
## Attributes
21+
22+
The Keystone attribute works similar to json/yaml attributes, where it contains a comma separated list, where the first part is the name (if left blank, the property name will be generated), and options are provided from that point.
23+
24+
PaymentCount int64 `keystone:"_count_relation:payment"`
25+
26+
- `_entity_id` - The loaded Keystone ID (Parent)
27+
- `_child_id` - The loaded Keystone ID (Child)
28+
- `_schema_id` - Schema ID
29+
- `_created` - Date/Time Created
30+
- `_state_change` - Date/Time State Change
31+
- `_state` - Current State
32+
- `_last_update` - Date/Time Last Updated
33+
34+
## Calculated Attributes
35+
36+
- `_count_relation`
37+
- `_count_descendant`
38+
39+
Optionally suffixed with :vendorId[:appId[:key]]
40+
41+
e.g.
42+
43+
```
44+
_count_relation:vendorId:appId:key
45+
_count_relation:vendorId:appId
46+
_count_relation:vendorId
47+
```
48+
49+
Optionally suffixed with :type[:vendorId[:appId[:key]]]
50+
51+
- `_child_count`
52+
- `_child_sum`
53+
- `_child_min`
54+
- `_child_max`
55+
- `_child_avg`
56+
57+
e.g.
58+
59+
```
60+
child_count:type:vendorId:appId:key
61+
child_count:type:vendorId:appId
62+
child_count:type:vendorId
63+
child_count:type
64+
```

0 commit comments

Comments
 (0)