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

Function GetFilesByLibraryID

api/model/file.go:616–623  ·  view source on GitHub ↗

GetFilesByLibraryID 获取知识库下的所有文件

(eid int64, libraryID int64)

Source from the content-addressed store, hash-verified

614
615// GetFilesByLibraryID 获取知识库下的所有文件
616func GetFilesByLibraryID(eid int64, libraryID int64) ([]File, error) {
617 var files []File
618 if err := DB.Where("eid = ? AND library_id = ?", eid, libraryID).Find(&files).Error; err != nil {
619 return nil, err
620 }
621
622 return files, nil
623}
624
625type libraryFileCountRow struct {
626 LibraryID int64 `gorm:"column:library_id"`

Callers 1

DeleteLibraryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected