Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for setupValuerAndSetter (0.07 sec)

  1. schema/schema.go

    			schema.FieldsByName[field.Name] = field
    		}
    		if of, ok := schema.FieldsByBindName[bindName]; !ok || of.TagSettings["-"] == "-" {
    			schema.FieldsByBindName[bindName] = field
    		}
    
    		field.setupValuerAndSetter(modelType)
    	}
    
    	prioritizedPrimaryField := schema.LookUpField("id")
    	if prioritizedPrimaryField == nil {
    		prioritizedPrimaryField = schema.LookUpField("ID")
    	}
    
    	if prioritizedPrimaryField != nil {
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Fri Oct 31 12:13:56 UTC 2025
    - 13.1K bytes
    - Viewed (0)
  2. schema/field.go

    		}
    	}
    
    	return field
    }
    
    // create valuer, setter when parse struct
    func (field *Field) setupValuerAndSetter(modelType reflect.Type) {
    	// Setup NewValuePool
    	field.setupNewValuePool()
    
    	// ValueOf returns field's value and if it is zero
    	fieldIndex := field.StructField.Index[0]
    	switch {
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sat Nov 22 03:14:36 UTC 2025
    - 32.2K bytes
    - Viewed (0)
Back to top