Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestParseUniqueConstraints (0.25 sec)

  1. schema/constraint_test.go

    					"check %v %v should equal, expects %v, got %v",
    					k, name, reflect.ValueOf(result).FieldByName(name).Interface(), reflect.ValueOf(v).FieldByName(name).Interface(),
    				)
    			}
    		}
    	}
    }
    
    func TestParseUniqueConstraints(t *testing.T) {
    	type UserUnique struct {
    		Name1 string `gorm:"unique"`
    		Name2 string `gorm:"uniqueIndex"`
    	}
    
    	user, err := schema.Parse(&UserUnique{}, &sync.Map{}, schema.NamingStrategy{})
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sun Feb 04 07:49:19 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top