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
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
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.
565
565
566
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.
567
567
568
568
Examples:
569
569
570
-
-`(ID,Name)`
570
+
-`(ID,Name)`: index name not set, then determined by parent struct type name.
571
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
572
+
-`(ID,Name)<ID>`: sort index by ID.
573
+
-`(ID,Type)<Type,Priority>@Item`: sort index by Type and Priority.
574
574
-`ID@Item, (ID,Name)@AwardItem`: one single-column index and one multi-column index.
0 commit comments