package repositories

import "strings"

// escapeLikeWildcards escapes SQL LIKE wildcard characters in user input
// to prevent users from injecting wildcards like % or _ into search queries.
func escapeLikeWildcards(s string) string {
	s = strings.ReplaceAll(s, "%", "\\%")
	s = strings.ReplaceAll(s, "_", "\\_")
	return s
}
