postgresql

package
v0.0.0-...-3266b2f Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Fingerprint = nodes.Fingerprint
View Source
var Parse = nodes.Parse

Functions

func IsNamedParamFunc

func IsNamedParamFunc(node *nodes.Node) bool

func IsNamedParamSign

func IsNamedParamSign(node *nodes.Node) bool

func NewCatalog

func NewCatalog() *catalog.Catalog

Types

type Parser

type Parser struct {
}

func NewParser

func NewParser() *Parser

func (*Parser) Cast

func (p *Parser) Cast(arg, typeName string) string

Cast returns a type cast expression. PostgreSQL uses expr::type syntax.

func (*Parser) NamedParam

func (p *Parser) NamedParam(name string) string

NamedParam returns the named parameter placeholder for the given name. PostgreSQL/sqlc uses @name syntax.

func (*Parser) Param

func (p *Parser) Param(n int) string

Param returns the parameter placeholder for the given number. PostgreSQL uses $1, $2, etc.

func (*Parser) Parse

func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error)

func (*Parser) QuoteIdent

func (p *Parser) QuoteIdent(s string) string

QuoteIdent returns a quoted identifier if it needs quoting. This implements the format.Dialect interface.

func (*Parser) TypeName

func (p *Parser) TypeName(ns, name string) string

TypeName returns the SQL type name for the given namespace and name. This implements the format.Dialect interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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