pgdialect

package module
v1.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version added in v1.0.22

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) AppendSequence added in v1.1.17

func (d *Dialect) AppendSequence(b []byte, _ *schema.Table, _ *schema.Field) []byte

func (*Dialect) AppendUint32 added in v1.0.14

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

func (*Dialect) AppendUint64 added in v1.0.14

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

func (*Dialect) DefaultVarcharLen added in v1.1.10

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 added in v0.2.14

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 added in v1.1.6

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

func HStore added in v1.1.6

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 added in v1.1.6

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

func (*HStoreValue) Scan added in v1.1.6

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

func (*HStoreValue) Value added in v1.1.6

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

Jump to

Keyboard shortcuts

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