Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for structfield2 (0.24 sec)

  1. schema/relationship.go

    		ownFieldsMap[joinFieldName] = ownField
    		fieldsMap[joinFieldName] = ownField
    		joinTableFields = append(joinTableFields, reflect.StructField{
    			Name:    joinFieldName,
    			PkgPath: ownField.StructField.PkgPath,
    			Type:    ownField.StructField.Type,
    			Tag: removeSettingFromTag(appendSettingFromTag(ownField.StructField.Tag, "primaryKey"),
    				"column", "autoincrement", "index", "unique", "uniqueindex"),
    		})
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  2. src/reflect/badlinkname.go

    //go:linkname badlinkname_rtype_Field reflect.(*rtype).Field
    func badlinkname_rtype_Field(*rtype, int) StructField
    
    //go:linkname badlinkname_rtype_FieldAlign reflect.(*rtype).FieldAlign
    func badlinkname_rtype_FieldAlign(*rtype) int
    
    //go:linkname badlinkname_rtype_FieldByIndex reflect.(*rtype).FieldByIndex
    func badlinkname_rtype_FieldByIndex(*rtype, []int) StructField
    
    //go:linkname badlinkname_rtype_FieldByName reflect.(*rtype).FieldByName
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. schema/field.go

    				}
    				// index is negative means is pointer
    				if field.FieldType.Kind() == reflect.Struct {
    					ef.StructField.Index = append([]int{fieldStruct.Index[0]}, ef.StructField.Index...)
    				} else {
    					ef.StructField.Index = append([]int{-fieldStruct.Index[0] - 1}, ef.StructField.Index...)
    				}
    
    				if prefix, ok := field.TagSettings["EMBEDDEDPREFIX"]; ok && ef.DBName != "" {
    					ef.DBName = prefix + ef.DBName
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
  4. src/reflect/type.go

    	panic("reflect: StructOf does not support methods of embedded interfaces")
    }
    
    // runtimeStructField takes a StructField value passed to StructOf and
    // returns both the corresponding internal representation, of type
    // structField, and the pkgpath value to use for this field.
    func runtimeStructField(field StructField) (structField, string) {
    	if field.Anonymous && field.PkgPath != "" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 85.5K bytes
    - Viewed (0)
  5. src/reflect/all_test.go

    		{
    			field: StructField{Name: "s2", Type: TypeOf(int(0)), PkgPath: "other/pkg"},
    		},
    		{
    			field: StructField{Name: "s2", Type: TypeOf(int(0)), PkgPath: "other/pkg"},
    		},
    		{
    			field:    StructField{Name: "S", Type: TypeOf(S1{})},
    			exported: true,
    		},
    		{
    			field:    StructField{Name: "S", Type: TypeOf((*S1)(nil))},
    			exported: true,
    		},
    		{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
  6. src/encoding/json/encode.go

    }
    
    var fieldCache sync.Map // map[reflect.Type]structFields
    
    // cachedTypeFields is like typeFields but uses a cache to avoid repeated work.
    func cachedTypeFields(t reflect.Type) structFields {
    	if f, ok := fieldCache.Load(t); ok {
    		return f.(structFields)
    	}
    	f, _ := fieldCache.LoadOrStore(t, typeFields(t))
    	return f.(structFields)
    }
    
    func mayAppendQuote(b []byte, quoted bool) []byte {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  7. src/reflect/type_test.go

    		}
    	}
    }
    
    func TestStructOfEmbeddedIfaceMethodCall(t *testing.T) {
    	type Named interface {
    		Name() string
    	}
    
    	typ := reflect.StructOf([]reflect.StructField{
    		{
    			Anonymous: true,
    			Name:      "Named",
    			Type:      reflect.TypeFor[Named](),
    		},
    	})
    
    	v := reflect.New(typ).Elem()
    	v.Field(0).Set(
    		reflect.ValueOf(reflect.TypeFor[string]()),
    	)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 23:39:44 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  8. src/internal/abi/type.go

    	Elem *Type // pointer element (pointed at) type
    }
    
    type StructField struct {
    	Name   Name    // name is always non-empty
    	Typ    *Type   // type of field
    	Offset uintptr // byte offset of field
    }
    
    func (f *StructField) Embedded() bool {
    	return f.Name.IsEmbedded()
    }
    
    type StructType struct {
    	Type
    	PkgPath Name
    	Fields  []StructField
    }
    
    // Name is an encoded type Name with optional extra data.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:09:59 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  9. src/cmd/link/internal/ld/decodesym.go

    	}
    }
    
    func commonsize(arch *sys.Arch) int      { return abi.CommonSize(arch.PtrSize) }      // runtime._type
    func structfieldSize(arch *sys.Arch) int { return abi.StructFieldSize(arch.PtrSize) } // runtime.structfield
    func uncommonSize(arch *sys.Arch) int    { return int(abi.UncommonSize()) }           // runtime.uncommontype
    
    // Type.commonType.kind
    func decodetypeKind(arch *sys.Arch, p []byte) abi.Kind {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 16:25:18 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  10. src/encoding/json/bench_test.go

    	if testenv.Builder() != "" {
    		maxTypes = 1e3 // restrict cache sizes on builders
    	}
    
    	// Dynamically generate many new types.
    	types := make([]reflect.Type, maxTypes)
    	fs := []reflect.StructField{{
    		Type:  reflect.TypeFor[string](),
    		Index: []int{0},
    	}}
    	for i := range types {
    		fs[0].Name = fmt.Sprintf("TypeFieldsCache%d", i)
    		types[i] = reflect.StructOf(fs)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:00:17 UTC 2024
    - 12.5K bytes
    - Viewed (0)
Back to top