MCPcopy
hub / github.com/pocketbase/pocketbase / dereference

Function dereference

core/record_query.go:184–193  ·  view source on GitHub ↗

dereference returns the underlying value v points to.

(v reflect.Value)

Source from the content-addressed store, hash-verified

182
183// dereference returns the underlying value v points to.
184func dereference(v reflect.Value) reflect.Value {
185 for v.Kind() == reflect.Ptr {
186 if v.IsNil() {
187 // initialize with a new value and continue searching
188 v.Set(reflect.New(v.Type().Elem()))
189 }
190 v = v.Elem()
191 }
192 return v
193}
194
195func getCollectionByModelOrIdentifier(app App, collectionModelOrIdentifier any) (*Collection, error) {
196 switch c := collectionModelOrIdentifier.(type) {

Callers 1

RecordQueryMethod · 0.70

Calls 2

SetMethod · 0.65
TypeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…