mirror of
https://github.com/gabehf/Koito.git
synced 2026-04-22 12:01:52 -07:00
Add bulk import optimization: track_lookup cache, batch inserts, BulkSubmitter
This commit is contained in:
parent
0ec7b458cc
commit
ae373a7090
21 changed files with 1296 additions and 125 deletions
9
internal/catalog/lookup_key.go
Normal file
9
internal/catalog/lookup_key.go
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package catalog
|
||||
|
||||
import "strings"
|
||||
|
||||
// TrackLookupKey builds a normalized cache key for entity resolution.
|
||||
// Uses null-byte separators 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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue