mirror of
https://github.com/gabehf/Koito.git
synced 2026-04-22 12:01:52 -07:00
Fix track_lookup key: use unit separator instead of null byte
Postgres TEXT columns reject null bytes (\x00), causing silent insert failures. Use U+001F (unit separator) instead.
This commit is contained in:
parent
ae373a7090
commit
e8413b4b74
1 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ package catalog
|
|||
import "strings"
|
||||
|
||||
// TrackLookupKey builds a normalized cache key for entity resolution.
|
||||
// Uses null-byte separators to avoid collisions between field values.
|
||||
// Uses unit separator (U+001F) to avoid collisions between field values.
|
||||
func TrackLookupKey(artist, track, album string) string {
|
||||
return strings.ToLower(artist) + "\x00" + strings.ToLower(track) + "\x00" + strings.ToLower(album)
|
||||
return strings.ToLower(artist) + "\x1f" + strings.ToLower(track) + "\x1f" + strings.ToLower(album)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue