Add documentation around DB lookup semantics
This commit is contained in:
parent
d56b21a3d1
commit
034c4e1088
1 changed files with 3 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue