photoprism/internal/search/sql.go
Michael Mayer 9d110e8b80 Search: Improve album, albums, lens, and camera filters #1994 #2079
Camera and lens can now also be searched by name. Escaping and parsing
of albums has been improved so that albums whose names start with and/or
contain numbers will be found.
2022-03-24 18:30:59 +01:00

12 lines
229 B
Go

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), " |&*%")
}