- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for CanAddr (0.14 sec)
-
callbacks/update.go
for i := 0; i < stmt.ReflectValue.Len(); i++ { if stmt.ReflectValue.CanAddr() { field.Set(stmt.Context, stmt.ReflectValue.Index(i), value) } } } case reflect.Struct: assignValue = func(field *schema.Field, value interface{}) { if stmt.ReflectValue.CanAddr() { field.Set(stmt.Context, stmt.ReflectValue, value) } } default:
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Mar 18 05:44:55 UTC 2024 - 9.4K bytes - Viewed (0) -
src/encoding/xml/read.go
} if val.CanAddr() { pv := val.Addr() if pv.CanInterface() && pv.Type().Implements(unmarshalerType) { return d.unmarshalInterface(pv.Interface().(Unmarshaler), start) } } if val.CanInterface() && val.Type().Implements(textUnmarshalerType) { return d.unmarshalTextInterface(val.Interface().(encoding.TextUnmarshaler)) } if val.CanAddr() { pv := val.Addr()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:04:28 UTC 2023 - 22.4K bytes - Viewed (0) -
src/encoding/xml/marshal.go
typ := val.Type() // Check for marshaler. if val.CanInterface() && typ.Implements(marshalerType) { return p.marshalInterface(val.Interface().(Marshaler), defaultStart(typ, finfo, startTemplate)) } if val.CanAddr() { pv := val.Addr() if pv.CanInterface() && pv.Type().Implements(marshalerType) { return p.marshalInterface(pv.Interface().(Marshaler), defaultStart(pv.Type(), finfo, startTemplate)) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 18:46:41 UTC 2024 - 31.2K bytes - Viewed (0) -
src/encoding/gob/encgen.go
package gob import ( "reflect" ) ` const arrayHelper = ` func enc%[2]sArray(state *encoderState, v reflect.Value) bool { // Can only slice if it is addressable. if !v.CanAddr() { return false } return enc%[2]sSlice(state, v.Slice(0, v.Len())) } ` const sliceHelper = ` func enc%[2]sSlice(state *encoderState, v reflect.Value) bool { slice, ok := v.Interface().([]%[1]s)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 22 16:39:09 UTC 2024 - 3.8K bytes - Viewed (0) -
schema/utils.go
case reflect.Slice, reflect.Array: for i := 0; i < reflectValue.Len(); i++ { elem := reflectValue.Index(i) elemKey := elem.Interface() if elem.Kind() != reflect.Ptr && elem.CanAddr() { elemKey = elem.Addr().Interface() } if _, ok := loaded[elemKey]; ok { continue } loaded[elemKey] = true fieldValues := make([]interface{}, len(fields))
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Sat Aug 19 13:35:14 UTC 2023 - 5.5K bytes - Viewed (0) -
src/encoding/gob/decgen.go
import ( "math" "reflect" ) ` const arrayHelper = ` func dec%[2]sArray(state *decoderState, v reflect.Value, length int, ovfl error) bool { // Can only slice if it is addressable. if !v.CanAddr() { return false } return dec%[2]sSlice(state, v.Slice(0, v.Len()), length, ovfl) } ` const sliceHelper = ` func dec%[2]sSlice(state *decoderState, v reflect.Value, length int, ovfl error) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 14:15:38 UTC 2024 - 5.3K bytes - Viewed (0) -
association.go
if association.Relationship.Field.FieldType.Kind() == reflect.Struct { assignBacks = append(assignBacks, assignBack{Source: source, Dest: rv.Index(0)}) } } case reflect.Struct: if !rv.CanAddr() { association.Error = ErrInvalidValue return } association.Error = association.Relationship.Field.Set(association.DB.Statement.Context, source, rv.Addr().Interface())
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K bytes - Viewed (0) -
statement.go
destValue := reflect.ValueOf(stmt.Dest) for destValue.Kind() == reflect.Ptr { destValue = destValue.Elem() } if stmt.ReflectValue != destValue { if !destValue.CanAddr() { destValueCanAddr := reflect.New(destValue.Type()) destValueCanAddr.Elem().Set(destValue) stmt.Dest = destValueCanAddr.Interface() destValue = destValueCanAddr.Elem() }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Jan 12 08:42:21 UTC 2024 - 19.8K bytes - Viewed (0) -
callbacks.go
} } // assign stmt.ReflectValue if stmt.Dest != nil { stmt.ReflectValue = reflect.ValueOf(stmt.Dest) for stmt.ReflectValue.Kind() == reflect.Ptr { if stmt.ReflectValue.IsNil() && stmt.ReflectValue.CanAddr() { stmt.ReflectValue.Set(reflect.New(stmt.ReflectValue.Type().Elem())) } stmt.ReflectValue = stmt.ReflectValue.Elem() } if !stmt.ReflectValue.IsValid() { db.AddError(ErrInvalidValue) }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Tue Mar 26 03:33:36 UTC 2024 - 8.6K bytes - Viewed (0) -
scan.go
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 10:57:36 UTC 2024 - 10K bytes - Viewed (0)