package sanitize
import "github.com/jackc/pgx/v5/internal/sanitize"
Index ¶
- func QuoteBytes(buf []byte) string
- func QuoteString(str string) string
- func SanitizeSQL(sql string, args ...any) (string, error)
- type Part
- type Query
Functions ¶
func QuoteBytes ¶
func QuoteString ¶
func SanitizeSQL ¶
SanitizeSQL replaces placeholder values with args. It quotes and escapes args as necessary. This function is only safe when standard_conforming_strings is on.
Types ¶
type Part ¶
type Part any
Part is either a string or an int. A string is raw SQL. An int is a argument placeholder.
type Query ¶
type Query struct { Parts []Part }
func NewQuery ¶
func (*Query) Sanitize ¶
Source Files ¶
- Version
- v5.3.1
- Published
- Feb 28, 2023
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 11 hours ago –
Tools for package owners.