You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`unique`| bool | Check field uniqueness. <br> Default: `false`. Specially for map (or KeyedList) key, default will be auto deduced.|
18
18
|`range`| string | Format: `"left, right"`. E.g.: `"1,10"`, `"1,~"`, `"~,10"`. <br> Different interpretations of range: <br> - number: value range. <br> - string: count of utf-8 code point. |
19
19
|`refer`| string | Format: `"SheetName(SheetAlias).ColumnName"`.<br>Ensure this field is in another sheet's column value space. Multiple refers are comma-separated. |
20
20
|`sequence`| int64 | Ensure this field's value is a sequence and begins with this value. |
|`cross`| int32 | Specify count of crossed nodes/cells/fields of composite types with cardinality, such as list and map. |
31
32
{.table-striped .table-hover}
32
33
33
34
## Option `unique`
34
35
35
-
Option `unique` can be specified as `true` in the map field property. Then tableau will report an error if a duplicate key is appeared.
36
+
Option `unique` can be specified as `true`or `false`in the field property.
36
37
37
-
{{< alert icon="👉" context="info" text="In most cases, tableau will auto deduce the map key is unique or not. The rule is: if a map's value type has no same layout map/list field, then this map key must be unique. So it is not neccessary to config it." />}}
38
+
- If you set `unique` to `true` explicitly, then tableau will report an error if a duplicate key is appeared.
39
+
- If you set `unique` to `false` explicitly, no check will be performed.
40
+
41
+
### Map (or KeyedList) key
42
+
43
+
Tableau will auto deduce the map (or KeyedList) key's `unique` as true or not.
44
+
45
+
**The rule is**: if a map's value type (or KeyedList element type) has no sub map/list field of the same layout (vertical/horizontal), then the key must be unique.
46
+
47
+
So in most cases, it's not neccessary to config it explicitly.
48
+
49
+
### General scalar field
50
+
51
+
If you specify a general scalar field's property `unique` as true, then tableau will check the field's uniquness in map or list.
38
52
39
53
## Option `range`
40
54
@@ -171,3 +185,21 @@ If not set, it will use **sheet-level** seq in [metasheet](../metasheet/#option-
171
185
- struct fields of each incell struct list element.
172
186
173
187
If not set, it will use **sheet-level** subseq in [metasheet](../metasheet/#option-subsep).
188
+
189
+
## Option `cross`
190
+
191
+
Specify count of crossed nodes/cells/fields of composite types with
192
+
cardinality, such as list and map.
193
+
194
+
### union list field
195
+
196
+
Specify the count of union fields the list will cross and occupy
197
+
(one list element for each field). It will also change this list
198
+
field's layout from incell to horizontal.
199
+
200
+
- Value 0 means it is an incell list.
201
+
- Value > 0 means it is a horizontal list occupying N fields.
202
+
- Value < 0 means it is a horizontal list occupying all following fields.
0 commit comments