pgx: github.com/jackc/pgx/internal/sanitize Index | Files

package sanitize

import "github.com/jackc/pgx/internal/sanitize"

Index

Package Files

sanitize.go

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 6 packages. Updated 2019-07-01. Refresh now. Tools for package owners.