Skip to content

Commit 67e9d04

Browse files
committed
Update 1300 - types.md
1 parent 71358f3 commit 67e9d04

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

readme-sync/v0/senseml-reference/2000 - field-query-object/1300 - types.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The following types are available:
2626

2727
[Address](doc:types#address)
2828
[Boolean](doc:types#boolean)
29+
[Compose](doc:types#compose)
2930
[Currency](doc:types#currency)
3031
[Custom](doc:types#custom)
3132
[Date](doc:types#date)
@@ -134,6 +135,27 @@ Example output:
134135
}
135136
```
136137

138+
Compose
139+
====
140+
141+
Defines a custom type composed of types. Lets you transform type output, much as [computed field methods](doc:computed-field-methods) let you filter and transform type output. For example:
142+
143+
- It's useful when you need to transform field output but you can't define a regex match for that output. For example, you can define a type but not a match for the cells in a table column.
144+
- It's useful when you want to transform a typed output with multiple possible source formats (eg date example).
145+
146+
**Syntax example**
147+
148+
**Output example**
149+
150+
**Parameters**
151+
152+
| key | value | description |
153+
| -------------------- | --------------------- | ------------------------------------------------------------ |
154+
| id (**required**) | `compose` | |
155+
| types (**required**) | array of type objects | Each type in a compose array takes the output of the previous type as its input. |
156+
157+
158+
137159
Currency
138160
====
139161

0 commit comments

Comments
 (0)