MCPcopy
hub / github.com/pocketbase/pocketbase / RemoveIndex

Method RemoveIndex

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

RemoveIndex removes a single index with the specified name from the current collection.

(name string)

Source from the content-addressed store, hash-verified

672
673// RemoveIndex removes a single index with the specified name from the current collection.
674func (m *Collection) RemoveIndex(name string) {
675 for i, idx := range m.Indexes {
676 if strings.EqualFold(dbutils.ParseIndex(idx).IndexName, name) {
677 m.Indexes = append(m.Indexes[:i], m.Indexes[i+1:]...)
678 return
679 }
680 }
681}
682
683// delete hook
684// -------------------------------------------------------------------

Callers 6

AddIndexMethod · 0.95
TestCollectionValidateFunction · 0.80
TestRecordAuthWithOAuth2Function · 0.80

Calls 1

ParseIndexFunction · 0.92

Tested by 5

TestCollectionValidateFunction · 0.64
TestRecordAuthWithOAuth2Function · 0.64