pgdialect

package module
v0.0.0-...-96b7b1b Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: BSD-2-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version() string

Version is the current release version.

Types

type ArrayValue

type ArrayValue struct {
	// contains filtered or unexported fields
}

func Array

func Array(vi interface{}) *ArrayValue

Array accepts a slice and returns a wrapper for working with PostgreSQL array data type.

For struct fields you can use array tag:

Emails  []string `bun:",array"`

func (*ArrayValue) AppendQuery

func (a *ArrayValue) AppendQuery(fmter schema.Formatter, b []byte) ([]byte, error)

func (*ArrayValue) Scan

func (a *ArrayValue) Scan(src interface{}) error

func (*ArrayValue) Value

func (a *ArrayValue) Value() interface{}

type Dialect

type Dialect struct {
	schema.BaseDialect
	// contains filtered or unexported fields
}

func New

func New() *Dialect

func (*Dialect) AppendUint32

func (d *Dialect) AppendUint32(b []byte, n uint32) []byte

func (*Dialect) AppendUint64

func (d *Dialect) AppendUint64(b []byte, n uint64) []byte

func (*Dialect) DefaultVarcharLen

func (d *Dialect) DefaultVarcharLen() int

func (*Dialect) Features

func (d *Dialect) Features() feature.Feature

func (*Dialect) IdentQuote

func (d *Dialect) IdentQuote() byte

func (*Dialect) Init

func (d *Dialect) Init(*sql.DB)

func (*Dialect) Name

func (d *Dialect) Name() dialect.Name

func (*Dialect) OnTable

func (d *Dialect) OnTable(table *schema.Table)

func (*Dialect) Tables

func (d *Dialect) Tables() *schema.Tables

type HStoreValue

type HStoreValue struct {
	// contains filtered or unexported fields
}

func HStore

func HStore(vi interface{}) *HStoreValue

HStore accepts a map[string]string and returns a wrapper for working with PostgreSQL hstore data type.

For struct fields you can use hstore tag:

Attrs  map[string]string `bun:",hstore"`

func (*HStoreValue) AppendQuery

func (h *HStoreValue) AppendQuery(fmter schema.Formatter, b []byte) ([]byte, error)

func (*HStoreValue) Scan

func (h *HStoreValue) Scan(src interface{}) error

func (*HStoreValue) Value

func (h *HStoreValue) Value() interface{}

Jump to

Keyboard shortcuts

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