MCPcopy
hub / github.com/go-gorm/gorm / MakeSlice

Method MakeSlice

schema/schema.go:71–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69}
70
71func (schema *Schema) MakeSlice() reflect.Value {
72 slice := reflect.MakeSlice(reflect.SliceOf(reflect.PointerTo(schema.ModelType)), 0, 20)
73 results := reflect.New(slice.Type())
74 results.Elem().Set(slice)
75
76 return results
77}
78
79func (schema *Schema) LookUpField(name string) *Field {
80 if field, ok := schema.FieldsByDBName[name]; ok {

Callers 7

ScanFunction · 0.80
saveAssociationMethod · 0.80
SaveBeforeAssociationsFunction · 0.80
SaveAfterAssociationsFunction · 0.80
preloadEntryPointFunction · 0.80
preloadFunction · 0.80
GetRelationsValuesFunction · 0.80

Calls 3

NewMethod · 0.65
TypeMethod · 0.65
SetMethod · 0.65

Tested by

no test coverage detected