MCPcopy
hub / github.com/pocketbase/pocketbase / ExpandRecord

Method ExpandRecord

core/record_query_expand.go:24–26  ·  view source on GitHub ↗

ExpandRecord expands the relations of a single Record model. If optFetchFunc is not set, then a default function will be used that returns all relation records. Returns a map with the failed expand parameters and their errors.

(record *Record, expands []string, optFetchFunc ExpandFetchFunc)

Source from the content-addressed store, hash-verified

22//
23// Returns a map with the failed expand parameters and their errors.
24func (app *BaseApp) ExpandRecord(record *Record, expands []string, optFetchFunc ExpandFetchFunc) map[string]error {
25 return app.ExpandRecords([]*Record{record}, expands, optFetchFunc)
26}
27
28// ExpandRecords expands the relations of the provided Record models list.
29//

Callers

nothing calls this directly

Calls 1

ExpandRecordsMethod · 0.95

Tested by

no test coverage detected