Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for NumField (0.37 sec)

  1. utils/tests/utils.go

    				return
    			}
    		}
    
    		if reflect.ValueOf(got).Kind() == reflect.Struct {
    			if reflect.ValueOf(expect).Kind() == reflect.Struct {
    				if reflect.ValueOf(got).NumField() == reflect.ValueOf(expect).NumField() {
    					exported := false
    					for i := 0; i < reflect.ValueOf(got).NumField(); i++ {
    						if fieldStruct := reflect.ValueOf(got).Type().Field(i); ast.IsExported(fieldStruct.Name) {
    							exported = true
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Mar 10 09:21:56 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  2. clause/expression.go

    				reflectValue = reflect.Indirect(reflectValue)
    				switch reflectValue.Kind() {
    				case reflect.Struct:
    					modelType := reflectValue.Type()
    					for i := 0; i < modelType.NumField(); i++ {
    						if fieldStruct := modelType.Field(i); ast.IsExported(fieldStruct.Name) {
    							namedMap[fieldStruct.Name] = reflectValue.Field(i).Interface()
    
    							if fieldStruct.Anonymous {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:45:48 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  3. tests/migrate_test.go

    	}
    	typ := reflect.Indirect(reflect.ValueOf(&UserMigrateColumn2{})).Type()
    	numField := typ.NumField()
    	if numField != len(columnTypes) {
    		t.Fatalf("column's number not match struct and ddl, %d != %d", numField, len(columnTypes))
    	}
    	namer := schema.NamingStrategy{}
    	for i := 0; i < numField; i++ {
    		expectName := namer.ColumnName("", typ.Field(i).Name)
    		if columnTypes[i].Name() != expectName {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  4. schema/field.go

    					for i := 0; i < rvType.NumField(); i++ {
    						for key, value := range ParseTagSetting(rvType.Field(i).Tag.Get("gorm"), ";") {
    							if _, ok := field.TagSettings[key]; !ok {
    								field.TagSettings[key] = value
    							}
    						}
    					}
    
    					for i := 0; i < rvType.NumField(); i++ {
    						newFieldType := rvType.Field(i).Type
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  5. schema/schema.go

    	if v, ok := cacheStore.Load(schemaCacheKey); ok {
    		s := v.(*Schema)
    		// Wait for the initialization of other goroutines to complete
    		<-s.initialized
    		return s, s.err
    	}
    
    	for i := 0; i < modelType.NumField(); i++ {
    		if fieldStruct := modelType.Field(i); ast.IsExported(fieldStruct.Name) {
    			if field := schema.ParseField(fieldStruct); field.EmbeddedSchema != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:50:29 GMT 2023
    - 13.7K bytes
    - Viewed (0)
Back to top