MCPcopy Create free account
hub / github.com/53AI/53AIHub / GetFileByID

Function GetFileByID

api/model/file.go:535–541  ·  view source on GitHub ↗
(eid int64, id int64)

Source from the content-addressed store, hash-verified

533}
534
535func GetFileByID(eid int64, id int64) (*File, error) {
536 var file File
537 if err := DB.Where("eid = ? AND id =?", eid, id).First(&file).Error; err != nil {
538 return nil, err
539 }
540 return &file, nil
541}
542
543func GetFileByIDOlny(id int64) (*File, error) {
544 var file File

Callers 11

RestoreFileFunction · 0.85
CheckHasChildrenFunction · 0.85
DeleteFileFunction · 0.85
deleteFileWithCascadeFunction · 0.85
cascadeDeleteFileDataFunction · 0.85
deleteVectorsFromDBFunction · 0.85
GetFileWithParentsByIDFunction · 0.85
CleanupVectorDataForFileFunction · 0.85
SoftDeleteFileFunction · 0.85
RestoreDeletedFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected