refactor: split dbx package into domain files

Reorganize monolithic dbx.go and utility.go into focused files by
concern, add package doc.go, and gitignore coverage.out.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 17:46:54 -07:00
parent 14686a83cb
commit f9befa1b0a
16 changed files with 652 additions and 583 deletions
+13
View File
@@ -0,0 +1,13 @@
package dbx
import "strings"
// StringToFilter processes a string to be used as a filter in an SQL LIKE
// statement. It replaces all spaces with % and adds % to the beginning and
// end of the string.
func StringToFilter(str string) string {
str = strings.Trim(str, "%")
str = strings.ReplaceAll(str, " ", "%")
str = "%" + str + "%"
return str
}