Add documentation around DB lookup semantics

This commit is contained in:
froge 2025-02-14 06:26:16 +10:00
parent d56b21a3d1
commit 034c4e1088
Signed by: froge
GPG key ID: A825E09930271BFA

View file

@ -72,7 +72,9 @@ func (env *Env) getArtistByName(c *gin.Context) {
}
// Lookup this name in the DB and return any ArtistProfile objects
// This is case insensitive on sqlite
// NOTE: This is case insensitive on sqlite
// NOTE: However unicode is treated case sensitive due to very difficult conversions for some languages/characters
// NOTE: In future better DBs with unicode support such as postgres should be used
var artistProfiles []ArtistProfile
dbResult := env.db.Where("name LIKE ?", fmt.Sprintf("%%%s%%", artistName)).Preload("Genres").Find(&artistProfiles)
if dbResult.Error != nil {