index: improve the comments for the test cases of composite id
This commit is contained in:
		
							parent
							
								
									a0e23e45fa
								
							
						
					
					
						commit
						b7fd54ddfb
					
				@ -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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user