MCPcopy
hub / github.com/pocketbase/pocketbase / NewFieldsList

Function NewFieldsList

core/fields_list.go:12–20  ·  view source on GitHub ↗

NewFieldsList creates a new FieldsList instance with the provided fields.

(fields ...Field)

Source from the content-addressed store, hash-verified

10
11// NewFieldsList creates a new FieldsList instance with the provided fields.
12func NewFieldsList(fields ...Field) FieldsList {
13 l := make(FieldsList, 0, len(fields))
14
15 for _, f := range fields {
16 l.add(-1, f)
17 }
18
19 return l
20}
21
22// FieldsList defines a Collection slice of fields.
23type FieldsList []Field

Callers 15

TestCollectionValidateFunction · 0.92
TestNewFieldsListFunction · 0.92
TestFieldsListCloneFunction · 0.92
TestFieldsListFieldNamesFunction · 0.92
TestFieldsListAsMapFunction · 0.92
TestFieldsListGetByIdFunction · 0.92
TestFieldsListGetByNameFunction · 0.92
TestFieldsListRemoveFunction · 0.92
TestFieldsListAddFunction · 0.92
TestFieldsListAddAtFunction · 0.92

Calls 1

addMethod · 0.65

Tested by 13

TestCollectionValidateFunction · 0.74
TestNewFieldsListFunction · 0.74
TestFieldsListCloneFunction · 0.74
TestFieldsListFieldNamesFunction · 0.74
TestFieldsListAsMapFunction · 0.74
TestFieldsListGetByIdFunction · 0.74
TestFieldsListGetByNameFunction · 0.74
TestFieldsListRemoveFunction · 0.74
TestFieldsListAddFunction · 0.74
TestFieldsListAddAtFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…