Remove the uncalled Library name search

Library.Search predated query-based Search and had no callers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Samuel CuiandClaude Opus 5.5 committed 2026-10-31 15:46:10 +08:00
1 parent 80e15cd4de
commit a6125e679d
1 file changed
-13
-13
View File
@@ -497,16 +497,3 @@ func listFileRowParents(tx *gorm.DB, id int64) ([]*File, error) {
return result, nil
}
func (l *Library) Search(ctx context.Context, name string) ([]*File, error) {
// Search persisted identities before attaching compatibility projections.
rows := make([]*fileRow, 0, 4)
if r := l.readDB().WithContext(ctx).Where("name LIKE ?", "%"+name+"%").Order("name").Limit(100).Find(&rows); r.Error != nil {
return nil, fmt.Errorf("find files fail, %w", r.Error)
}
files := fileViews(rows)
if err := hydrateFileViews(l.readDB().WithContext(ctx), files...); err != nil {
return nil, fmt.Errorf("hydrate files fail, %w", err)
}
return files, nil
}