Version: v1.2.4 Latest Latest

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

Go to latest
Published: Jun 11, 2021 License: MIT Imports: 8 Imported by: 0




This section is empty.


This section is empty.


func GetPgDollarTag

func GetPgDollarTag() string

GetPgDollarTag returns the current Postgres string dollar quoting tag.


type Postgres

type Postgres struct{}

Postgres is the PostgeSQL dialect.

func New

func New() *Postgres

New returns a new Postgres dialect.

func (*Postgres) WriteFormattedTime added in v1.1.8

func (pd *Postgres) WriteFormattedTime(buf common.BufferWriter, t time.Time)

WriteFormattedTime formats t into a format postgres understands. Taken with gratitude from pq:

func (*Postgres) WriteIdentifier

func (pd *Postgres) WriteIdentifier(buf common.BufferWriter, ident string)

WriteIdentifier writes escaped identifier.

func (*Postgres) WriteReflectedType added in v1.2.0

func (pd *Postgres) WriteReflectedType(buf common.BufferWriter, t interface{})

WriteReflectedType will write a Postgres-specific type name based on a primitive type given by r

func (*Postgres) WriteStringLiteral

func (pd *Postgres) WriteStringLiteral(buf common.BufferWriter, val string)

WriteStringLiteral writes an escaped string. No escape characters are allowed.

Postgres 9.1+ does not allow any escape sequences by default. See In short, all backslashes are treated literally not as escape sequences.

type SQLType added in v1.2.0

type SQLType interface {
	SQLType() string

SQLType is called by WriteReflectedType before any other conversion is considered. This allows for types which implement Scan/Value to also provide their own SQL type name

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL