bunpgd

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(dataSourceName string, opts ...bun.DBOption) (*bun.DB, error)

func WithConnMaxIdleTime

func WithConnMaxIdleTime(d time.Duration) bun.DBOption

func WithCreateTable

func WithCreateTable(ctx context.Context, cancel context.CancelCauseFunc, model ...any) bun.DBOption

func WithMaxIdleConns

func WithMaxIdleConns(n int) bun.DBOption

func WithMaxOpenConns

func WithMaxOpenConns(n int) bun.DBOption

func WithOTEL

func WithOTEL(option ...bunotel.Option) bun.DBOption

func WithSLog

func WithSLog(opts ...bunslog.Option) bun.DBOption

Types

type Array

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

func ArrayFormReflect

func ArrayFormReflect(rt reflect.Type, rv reflect.Value) *Array

func ToArray

func ToArray[T any](arr []T) *Array

func (*Array) AppendQuery

func (a *Array) AppendQuery(gen schema.QueryGen, b []byte) ([]byte, error)

type Dialect

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

func New

func New() *Dialect

func (*Dialect) AppendSequence

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

func (*Dialect) DefaultSchema

func (d *Dialect) DefaultSchema() string

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) NewMigrator

func (d *Dialect) NewMigrator(db *bun.DB, schemaName string) sqlschema.Migrator

func (*Dialect) OnTable

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

func (*Dialect) Tables

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

Jump to

Keyboard shortcuts

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