mirror of
https://github.com/gabehf/Koito.git
synced 2026-04-22 12:01:52 -07:00
Postgres TEXT columns reject null bytes (\x00), causing silent insert failures. Use U+001F (unit separator) instead.
9 lines
340 B
Go
9 lines
340 B
Go
package catalog
|
|
|
|
import "strings"
|
|
|
|
// TrackLookupKey builds a normalized cache key for entity resolution.
|
|
// Uses unit separator (U+001F) to avoid collisions between field values.
|
|
func TrackLookupKey(artist, track, album string) string {
|
|
return strings.ToLower(artist) + "\x1f" + strings.ToLower(track) + "\x1f" + strings.ToLower(album)
|
|
}
|