MCPcopy
hub / github.com/pocketbase/pocketbase / GetById

Method GetById

core/fields_list.go:64–71  ·  view source on GitHub ↗

GetById returns a single field by its id.

(fieldId string)

Source from the content-addressed store, hash-verified

62
63// GetById returns a single field by its id.
64func (l FieldsList) GetById(fieldId string) Field {
65 for _, field := range l {
66 if field.GetId() == fieldId {
67 return field
68 }
69 }
70 return nil
71}
72
73// GetByName returns a single field by its name.
74func (l FieldsList) GetByName(fieldName string) Field {

Callers 14

TestFieldsListGetByIdFunction · 0.95
TestFieldsListAddFunction · 0.95
addMethod · 0.95
SyncRecordTableSchemaMethod · 0.80
ImportCollectionsMethod · 0.80
ValidateSettingsMethod · 0.80
checkCollectionIdMethod · 0.80
parseQueryToFieldsFunction · 0.80
jsDiffTemplateMethod · 0.80

Calls 1

GetIdMethod · 0.65

Tested by 3

TestFieldsListGetByIdFunction · 0.76
TestFieldsListAddFunction · 0.76