Documentation
¶
Index ¶
- func EscapeLike(s string) string
- func EscapeSQL(s string) string
- func ParseRelativeTime(s string) string
- func SQLCondition(column, value string) string
- func SQLInCondition(column string, values []string) string
- func SQLLikeCondition(column, value string) string
- func ValidateID(id string) error
- func ValidateTag(tag string) error
- func ValidateType(t string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EscapeLike ¶
EscapeLike escapes LIKE pattern special characters (% and _)
func EscapeSQL ¶
EscapeSQL escapes a string for safe use in SQL string literals. This doubles single quotes and removes null bytes.
func ParseRelativeTime ¶
ParseRelativeTime converts "2h", "24h", "7d" to DuckDB interval strings. Returns empty string if invalid.
func SQLCondition ¶
SQLCondition safely builds a SQL equality condition after validation
func SQLInCondition ¶
SQLInCondition safely builds a SQL IN condition
func SQLLikeCondition ¶
SQLLikeCondition safely builds a SQL LIKE condition
func ValidateID ¶
ValidateID checks that an ID matches the safe pattern
func ValidateTag ¶
ValidateTag checks that a tag matches the safe pattern
func ValidateType ¶
ValidateType checks that a type string matches the safe pattern
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.