photoprism/internal/search/sql.go

13 lines
229 B
Go
Raw Normal View History

package search
import (
"strings"
"github.com/photoprism/photoprism/pkg/sanitize"
)
// SqlLike escapes a string for use in an SQL query.
func SqlLike(s string) string {
return strings.Trim(sanitize.SqlString(s), " |&*%")
}