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
|`duration`|`0s`| Format like: `72h3m0.5s`. <br>A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as `300ms`, `-1.5h` or `2h45m`. <br>Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. |
@@ -50,6 +54,8 @@ You should include the proto files provided by Tableau and Protocol Buffers:
50
54
51
55
## Fraction
52
56
57
+
> For use cases, see [Excel wellknown types: Fraction →]({{< relref "../excel/wellknown-types/#fraction" >}})
58
+
53
59
A fraction represents a part of a whole or, more generally, any number of equal parts. See [wiki: Fraction](https://en.wikipedia.org/wiki/Fraction) for more details.
54
60
55
61
| Type | Default | Description |
@@ -65,6 +71,8 @@ message Fraction {
65
71
66
72
## Comparator
67
73
74
+
> For use cases, see [Excel wellknown types: Comparator →]({{< relref "../excel/wellknown-types/#comparator" >}})
75
+
68
76
A comparator holds a `sign` and a fraction `value`. Any number or fraction can compare with it.
69
77
70
78
| Type | Default | Description |
@@ -89,16 +97,29 @@ message Comparator {
89
97
90
98
## Version
91
99
92
-
A version holds a version data with 3 formats: string, value interger and value list. A `pattern` option is required to parse the string into value interger, otherwise the default pattern `255.255.255` will be used.
100
+
> For use cases, see [Excel wellknown types: Version →]({{< relref "../excel/wellknown-types/#version" >}})
101
+
102
+
A version represents the version number in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation).
103
+
Version form is: `<MAJOR>.<MINOR>.<PATCH>[.<OTHER>]...`.
104
+
105
+
A version field holds three forms of representation for easy use:
106
+
107
+
- string version: `str`
108
+
- integer version: `val`
109
+
- integer version parts: `major`, `minor`, `patch`, `others`
110
+
111
+
You can specify the version `pattern` (a field property) as `<MAJOR_MAX>.<MINOR_MAX>.<PATCH_MAX>[.<OTHER_MAX>]...`.
112
+
113
+
- Each part with suffix "MAX" represents the max decimal value of each part in the [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation).
114
+
- Each part "XXX_MAX+1" represents the part's value occupying in an integer.
115
+
- Integer version formula for general pattern `<MAJOR_MAX>.<MINOR_MAX>.<PATCH_MAX>` is: `MAJOR*(MINOR_MAX+1)*(PATCH_MAX+1) + MINOR*(PATCH_MAX+1) + PATCH`
|`val`|`0`| Value interger of the version, see the conversion algorithm [here](https://github.com/tableauio/tableau/commit/444a01ff8c4947a249e8d0ea5c4c8c491cea69d3#diff-fd73b99348b802b948424f1740df144f17b6df75a8ff86316cd858f19fe7f87cR471). |
98
-
|`major`|`0`| Major version value, the 1st interger value of version string. |
99
-
|`minor`|`0`| Minor version value, the 2nd interger value of version string. Zero if there is no 2nd interger value in pattern. |
100
-
|`patch`|`0`| Patch version value, the 3rd interger value of version string. Zero if there is no 3rd interger value in pattern. |
101
-
|`others`|`[]`| Other version values, the 4rd or following interger values of version string. Nil if there is no 4rd or following interger values in pattern. |
The sign `@` is the separator between column name and index name. if `IndexName` is not set, it will be this column’s parent struct type name. One or more indexes can be specified by comma-separated rule.
549
+
The sign `@` is the separator between column name and index name. if `IndexName` is not set, it will be this column’s parent struct type name. One or more indexes can be specified by comma-separated rule. The columns in the angle brackets `<>` specify the sorting columns which the index sort by.
550
550
551
551
Examples:
552
552
553
553
-`ID`
554
554
-`ID@Item`
555
+
-`ID<ID>@Item`: sort index by ID
556
+
-`ID<Type,Priority>@Item`: sort index by Type and Priority
Multi-column index (or composite index) is composed of **multiple columns in the same struct** (in list or map) to increase query speed.
563
565
564
-
The sign `@` is the separator between enclosed column names by parentheses and index name. if `IndexName` is not set, it will be this column’s parent struct type name. One or more indexes can be specified by comma-separated rule.
566
+
The sign `@` is the separator between enclosed column names by parentheses and index name. if `IndexName` is not set, it will be this column’s parent struct type name. One or more indexes can be specified by comma-separated rule. The columns in the angle brackets `<>` specify the sorting columns which the index sort by.
565
567
566
568
Examples:
567
569
568
570
-`(ID,Name)`
569
571
-`(ID,Name)@AwardItem`
572
+
-`(ID,Name)<ID>@AwardItem`: sort index by ID
573
+
-`(ID,Type)<Type,Priority>@Item`: sort index by Type and Priority
570
574
-`ID@Item, (ID,Name)@AwardItem`: one single-column index and one multi-column index.
0 commit comments