From b7fd54ddfb282c2288604689139690c355b6403c Mon Sep 17 00:00:00 2001 From: Chiung-Ming Huang Date: Sun, 24 Apr 2022 19:10:53 +0800 Subject: [PATCH] index: improve the comments for the test cases of composite id --- schema/index_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/schema/index_test.go b/schema/index_test.go index 895da322..1fe31cc1 100644 --- a/schema/index_test.go +++ b/schema/index_test.go @@ -20,15 +20,15 @@ type UserIndex struct { MemberNumber string `gorm:"index:idx_id,priority:1"` Name7 string `gorm:"index:type"` - // Composite Index: In the same level of struct. + // Composite Index: Flattened structure. Data0A string `gorm:"index:,composite:comp_id0"` Data0B string `gorm:"index:,composite:comp_id0"` - // Composite Index: In the different levels of struct. + // Composite Index: Nested structure. Data1A string `gorm:"index:,composite:comp_id1"` CompIdxLevel1C - // Composite Index: Unique and priority + // Composite Index: Unique and priority. Data2A string `gorm:"index:,unique,composite:comp_id2,priority:2"` CompIdxLevel2C }