tableau
tableau copied to clipboard
FieldProp: add `join` option to combine sub-struct to main struct
📌 The
joinoption implementation should be based on PR #123.
The join concept is borrowed from SQL join:
A JOIN clause is used to combine rows from two or more tables, based on a related column between them.
Sheet Chapter
| ID | Name | SectionID | SectionDesc |
|---|---|---|---|
| map<uint32, Chapter> | string | map<uint32, Section>|{join:"Section.ID"} | string |
| Chapter’s ID | Chapter’s name | Section’s ID | Section’s Desc |
| 1 | Chapter1 | 101 | SectionDesc1 |
| 1 | Chapter1 | 102 | SectionDesc2 |
| 1 | Chapter1 | 103 | SectionDesc3 |
| 2 | Chapter2 | 201 | SectionDesc4 |
| 2 | Chapter2 | 202 | SectionDesc5 |
Sheet Section
| ID | Name |
|---|---|
| map<uint32, Section> | string |
| Section’s ID | Section’s Name |
| 101 | Name1 |
| 102 | Name2 |
| 103 | Name3 |
| 201 | Name4 |
| 202 | Name5 |