pgx: Index | Files

package sanitize

import ""


Package Files


func QuoteBytes Uses

func QuoteBytes(buf []byte) string

func QuoteString Uses

func QuoteString(str string) string

func SanitizeSQL Uses

func SanitizeSQL(sql string, args ...interface{}) (string, error)

SanitizeSQL replaces placeholder values with args. It quotes and escapes args as necessary. This function is only safe when standard_conforming_strings is on.

type Part Uses

type Part interface{}

Part is either a string or an int. A string is raw SQL. An int is a argument placeholder.

type Query Uses

type Query struct {
    Parts []Part

func NewQuery Uses

func NewQuery(sql string) (*Query, error)

func (*Query) Sanitize Uses

func (q *Query) Sanitize(args ...interface{}) (string, error)

Package sanitize imports 7 packages (graph) and is imported by 8 packages. Updated 2020-03-29. Refresh now. Tools for package owners.