postgres

package
v2.3.5 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BitType        = "VARBIT(255)"
	TextType       = "TEXT"
	BlobType       = "BYTEA"
	DateType       = "DATE"
	DatetimeType   = "TIMESTAMP"
	DatetimeTZType = "TIMESTAMPTZ"
	DecimalType    = "DECIMAL"
	DoubleType     = "FLOAT8"
	FloatType      = "FLOAT4"
	GeometryType   = "POINT"
	MediumintType  = "INTEGER"
	JSONType       = "JSON"
	IntType        = "INTEGER"
	SerialType     = "SERIAL"
	BigSerialType  = "BIGSERIAL"
	LongtextType   = "TEXT"
	LongblobType   = "BYTEA"
	BigintType     = "BIGINT"
	MediumtextType = "TEXT"
	MediumblobType = "BYTEA"
	SmallintType   = "INTEGER"
	TinyintType    = "SMALLINT"
	VarcharType    = "VARCHAR"
	BoolType       = "BOOLEAN"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Vendor

type Vendor struct {
}

func (*Vendor) AddColumn

func (v *Vendor) AddColumn(ctx context.Context, db *gorm.DB, col dbvendor.Column) error

func (*Vendor) ChangeColumn

func (v *Vendor) ChangeColumn(ctx context.Context, db *gorm.DB, col dbvendor.Column) error

func (*Vendor) CreateTable

func (v *Vendor) CreateTable(ctx context.Context, db *gorm.DB, t dbvendor.Table) error

func (*Vendor) Delete

func (v *Vendor) Delete(ctx context.Context, db *gorm.DB, dml dbvendor.DMLSchema, args ...interface{}) error

func (*Vendor) DropColumn

func (v *Vendor) DropColumn(ctx context.Context, db *gorm.DB, col dbvendor.Column) error

func (*Vendor) DropTable

func (v *Vendor) DropTable(ctx context.Context, db *gorm.DB, t dbvendor.Table) error

func (*Vendor) GetBatchInsertStatement added in v2.2.4

func (v *Vendor) GetBatchInsertStatement(dml dbvendor.DMLSchema, rows []interface{}) (statement string, err error)

func (*Vendor) GetInsertReturningPkStatement added in v2.2.6

func (v *Vendor) GetInsertReturningPkStatement(dml dbvendor.DMLSchema) (statement string, err error)

func (*Vendor) GetInsertStatement

func (v *Vendor) GetInsertStatement(dml dbvendor.DMLSchema) (statement string, err error)

func (*Vendor) GetUpdateStatement

func (v *Vendor) GetUpdateStatement(dml dbvendor.DMLSchema) (statement string, err error)

func (*Vendor) Insert

func (v *Vendor) Insert(ctx context.Context, db *gorm.DB, dml dbvendor.DMLSchema, args ...interface{}) (int64, error)

func (*Vendor) SelectById

func (v *Vendor) SelectById(ctx context.Context, db *gorm.DB, dml dbvendor.DMLSchema, args ...interface{}) (map[string]interface{}, error)

func (*Vendor) ToColumnType

func (v *Vendor) ToColumnType(goType string, autoincrementing bool) string

func (*Vendor) Update

func (v *Vendor) Update(ctx context.Context, db *gorm.DB, dml dbvendor.DMLSchema, args ...interface{}) error

Jump to

Keyboard shortcuts

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