MCPcopy
hub / github.com/pocketbase/pocketbase / Expand

Method Expand

core/record_model.go:674–681  ·  view source on GitHub ↗

Expand returns a shallow copy of the current Record model expand data (if any).

()

Source from the content-addressed store, hash-verified

672
673// Expand returns a shallow copy of the current Record model expand data (if any).
674func (m *Record) Expand() map[string]any {
675 if m.expand == nil {
676 // return a dummy initialized map to avoid assignment to nil map errors
677 return map[string]any{}
678 }
679
680 return m.expand.GetAll()
681}
682
683// SetExpand replaces the current Record's expand with the provided expand arg data (shallow copied).
684func (m *Record) SetExpand(expand map[string]any) {

Callers 9

TestRecordExpandFunction · 0.95
TestRecordMergeExpandFunction · 0.95
GetMethod · 0.95
expandRecordsMethod · 0.80
TestRecordOriginalFunction · 0.80
TestRecordFreshFunction · 0.80
TestRecordCloneFunction · 0.80
MergeExpandMethod · 0.80

Calls 1

GetAllMethod · 0.45

Tested by 6

TestRecordExpandFunction · 0.76
TestRecordMergeExpandFunction · 0.76
TestRecordOriginalFunction · 0.64
TestRecordFreshFunction · 0.64
TestRecordCloneFunction · 0.64