postgres

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package postgres registers the PostgreSQL driver and grammar.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grammar

type Grammar struct{}

Grammar implements database.Grammar for PostgreSQL.

func (Grammar) CompileType

func (Grammar) CompileType(kind string, opts database.ColumnTypeOptions) string

CompileType renders a Postgres column type.

func (Grammar) LastInsertIDStrategy

func (Grammar) LastInsertIDStrategy() database.InsertIDStrategy

LastInsertIDStrategy returns ViaReturning.

func (Grammar) Name

func (Grammar) Name() string

Name returns the driver name.

func (Grammar) Placeholder

func (Grammar) Placeholder(n int) string

Placeholder returns "$N" for the n-th argument.

func (Grammar) Quote

func (Grammar) Quote(ident string) string

Quote wraps an identifier in double quotes, escaping embedded quotes. It preserves dotted "schema.table" forms.

func (Grammar) SupportsReturning

func (Grammar) SupportsReturning() bool

SupportsReturning is true: Postgres handles INSERT ... RETURNING natively.

Jump to

Keyboard shortcuts

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