MCPcopy
hub / github.com/pocketbase/pocketbase / FindCachedCollectionByNameOrId

Method FindCachedCollectionByNameOrId

core/app.go:425–425  ·  view source on GitHub ↗

FindCachedCollectionByNameOrId is similar to [App.FindCollectionByNameOrId] but retrieves the Collection from the app cache instead of making a db call. NB! This method is suitable for read-only Collection operations. Returns [sql.ErrNoRows] if no Collection is found for consistency with the [App.

(nameOrId string)

Source from the content-addressed store, hash-verified

423 // - The cache is automatically updated on collections db change (create/update/delete).
424 // To manually reload the cache you can call [App.ReloadCachedCollections]
425 FindCachedCollectionByNameOrId(nameOrId string) (*Collection, error)
426
427 // FindCollectionReferences returns information for all relation
428 // fields referencing the provided collection.

Callers 15

NewOTPFunction · 0.65
NewAuthOriginFunction · 0.65
TestCollectionDeleteFunction · 0.65
validateRecordIdFunction · 0.65
NewExternalAuthFunction · 0.65
NewMFAFunction · 0.65
onCollectionSaveExecuteFunction · 0.65
ValidateValueMethod · 0.65
checkCollectionIdMethod · 0.65

Calls

no outgoing calls

Tested by 5

TestCollectionDeleteFunction · 0.52
TestFileDownloadFunction · 0.52
TestBindCoreRecordFunction · 0.52