Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,075 for reflect (0.19 sec)

  1. okhttp/src/main/resources/META-INF/native-image/okhttp/okhttp/reflect-config.json

    Jesse Wilson <******@****.***> 1703114827 -0500
    Json
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 438 bytes
    - Viewed (0)
  2. okcurl/src/main/resources/META-INF/native-image/okhttp3/okcurl/reflect-config.json

    Jesse Wilson <******@****.***> 1703114827 -0500
    Json
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 4 bytes
    - Viewed (0)
  3. 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++ {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Mar 10 09:21:56 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  4. schema/utils.go

    	}
    	return reflect.StructTag(fmt.Sprintf(`gorm:"%s;%s"`, value, t))
    }
    
    // GetRelationsValues get relations's values from a reflect value
    func GetRelationsValues(ctx context.Context, reflectValue reflect.Value, rels []*Relationship) (reflectResults reflect.Value) {
    	for _, rel := range rels {
    		reflectResults = reflect.MakeSlice(reflect.SliceOf(reflect.PtrTo(rel.FieldSchema.ModelType)), 0, 1)
    
    		appendToResults := func(value reflect.Value) {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Sat Aug 19 13:35:14 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  5. schema/field.go

    		}
    	}
    
    	if field.Size == 0 {
    		switch reflect.Indirect(fieldValue).Kind() {
    		case reflect.Int, reflect.Int64, reflect.Uint, reflect.Uint64, reflect.Float64:
    			field.Size = 64
    		case reflect.Int8, reflect.Uint8:
    			field.Size = 8
    		case reflect.Int16, reflect.Uint16:
    			field.Size = 16
    		case reflect.Int32, reflect.Uint32, reflect.Float32:
    			field.Size = 32
    		}
    	}
    
    	// setup permission
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  6. statement.go

    			}
    
    			writer.WriteString(subdb.Statement.SQL.String())
    			stmt.Vars = subdb.Statement.Vars
    		default:
    			switch rv := reflect.ValueOf(v); rv.Kind() {
    			case reflect.Slice, reflect.Array:
    				if rv.Len() == 0 {
    					writer.WriteString("(NULL)")
    				} else if rv.Type().Elem() == reflect.TypeOf(uint8(0)) {
    					stmt.Vars = append(stmt.Vars, v)
    					stmt.DB.Dialector.BindVarTo(writer, stmt, v)
    				} else {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  7. scan.go

    					}
    				}
    			}
    		}
    
    		switch reflectValue.Kind() {
    		case reflect.Slice, reflect.Array:
    			var (
    				elem        reflect.Value
    				isArrayKind = reflectValue.Kind() == reflect.Array
    			)
    
    			if !update || reflectValue.Len() == 0 {
    				update = false
    				if isArrayKind {
    					db.Statement.ReflectValue.Set(reflect.Zero(reflectValue.Type()))
    				} else {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Mar 15 06:14:48 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  8. schema/serializer.go

    	switch v := fieldValue.(type) {
    	case int64, int, uint, uint64, int32, uint32, int16, uint16:
    		result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC()
    	case *int64, *int, *uint, *uint64, *int32, *uint32, *int16, *uint16:
    		if rv.IsZero() {
    			return nil, nil
    		}
    		result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC()
    	default:
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 08:28:46 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  9. callbacks/preload.go

    			if reflectFieldValue.Kind() == reflect.Ptr && reflectFieldValue.IsNil() {
    				reflectFieldValue.Set(reflect.New(rel.Field.FieldType.Elem()))
    			}
    
    			reflectFieldValue = reflect.Indirect(reflectFieldValue)
    			switch reflectFieldValue.Kind() {
    			case reflect.Struct:
    				tx.AddError(rel.Field.Set(tx.Statement.Context, data, elem.Interface()))
    			case reflect.Slice, reflect.Array:
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  10. callbacks/callmethod.go

    package callbacks
    
    import (
    	"reflect"
    
    	"gorm.io/gorm"
    )
    
    func callMethod(db *gorm.DB, fc func(value interface{}, tx *gorm.DB) bool) {
    	tx := db.Session(&gorm.Session{NewDB: true})
    	if called := fc(db.Statement.ReflectValue.Interface(), tx); !called {
    		switch db.Statement.ReflectValue.Kind() {
    		case reflect.Slice, reflect.Array:
    			db.Statement.CurDestIndex = 0
    			for i := 0; i < db.Statement.ReflectValue.Len(); i++ {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Sat Feb 18 01:20:29 GMT 2023
    - 846 bytes
    - Viewed (0)
Back to top