valid

package
v0.0.0-...-3cb81e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PostgreSQLNameDataLen = 64
	PostgreSQLNameDataMin = 3
)

Variables

View Source
var (
	ErrInvalidName = errors.New("invalid name")
)

Functions

This section is empty.

Types

type PGIdentifier

type PGIdentifier string

based on pgx.Identifier from `jackc/pgx` PGIdentifier a PostgreSQL identifier or name. Identifiers can be composed of multiple parts such as ["schema", "table"] or ["table", "column"].

func (PGIdentifier) Sanitize

func (ident PGIdentifier) Sanitize() string

Sanitize returns a sanitized string safe for SQL interpolation.

func (PGIdentifier) String

func (ident PGIdentifier) String() string

String returns a string safe for SQL and URIs.

func (PGIdentifier) Validate

func (ident PGIdentifier) Validate() (string, error)

type PGValue

type PGValue string

PGValue a PostgreSQL value.

func (PGValue) Sanitize

func (ident PGValue) Sanitize() string

Sanitize returns a sanitized string safe for SQL interpolation.

func (PGValue) String

func (ident PGValue) String() string

String returns a string safe for SQL and URI use.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL