Reputation: 33
i couldn't find any thing like this but it is exactly like (not in golang ) this
DB.Where(like(client))
should i make a function that return the sql query
edit : i meant using a struct not a string query
Upvotes: 1
Views: 1802
Reputation: 179
From the GORM docs e.g.
db.Where("name LIKE ?", "%jin%")
https://gorm.io/docs/query.html#Conditions
Upvotes: 5