MCPcopy
hub / github.com/pocketbase/pocketbase / Add

Method Add

core/fields_list.go:118–122  ·  view source on GitHub ↗

Add adds one or more fields to the current list. By default this method will try to REPLACE existing fields with the new ones by their id or by their name if the new field doesn't have an explicit id. If no matching existing field is found, it will APPEND the field to the end of the list. In all

(fields ...Field)

Source from the content-addressed store, hash-verified

116// In all cases, if any of the new fields don't have an explicit id it will auto generate a default one for them
117// (the id value doesn't really matter and it is mostly used as a stable identifier in case of a field rename).
118func (l *FieldsList) Add(fields ...Field) {
119 for _, f := range fields {
120 l.add(-1, f)
121 }
122}
123
124// AddAt is the same as Add but insert/move the fields at the specific position.
125//

Callers 15

TestFieldsListAddFunction · 0.95
AddMarshaledJSONMethod · 0.95
CreateViewFieldsMethod · 0.95
registerOTPHooksMethod · 0.45
DeleteExpiredOTPsMethod · 0.45
TestFileFieldFindSetterFunction · 0.45

Calls 1

addMethod · 0.95