docs(06-03): add SAFETY comments to all 12 hand-crafted SQL statements
- 7 SAFETY comments in search.go (FTS5 MATCH/INSERT/DELETE operations) - 3 SAFETY comments in library.go (FTS5 INSERT/DELETE in commitNewAudioFile, updateAudioFileMetadata) - 1 SAFETY comment in rescan.go (FTS5 DELETE in clearAllLibraryData) - 1 SAFETY comment in persistence.go (variable-count multi-row INSERT) - Cross-references link library.go/rescan.go back to search.go - Two-part format: why sqlc can't handle it + what makes it safe
This commit is contained in:
@@ -161,6 +161,7 @@ func (l *Library) clearLibraryTables() error {
|
||||
}
|
||||
|
||||
// Clear FTS5 search index.
|
||||
// SAFETY: FTS5 virtual table, see search.go:ClearSearchIndex. No parameters; unconditional delete.
|
||||
if _, err := tx.ExecContext(
|
||||
l.ctx, `DELETE FROM search_index`,
|
||||
); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user