mysql

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 bit
	BitType = "BIT"
	// TextType text
	TextType = "TEXT"
	// BlobType blob
	BlobType = "BLOB"
	// DateType date
	DateType = "DATE"
	// DatetimeType datatime
	DatetimeType = "DATETIME"
	// DecimalType decimal
	DecimalType = "DECIMAL"
	// DoubleType double
	DoubleType = "DOUBLE"
	// EnumType enum
	EnumType = "ENUM"
	// FloatType float
	FloatType = "FLOAT"
	// GeometryType geometry
	GeometryType = "GEOMETRY"
	// MediumintType medium int
	MediumintType = "MEDIUMINT"
	// JSONType json
	JSONType = "JSON"
	// IntType int
	IntType = "INT"
	// LongtextType long text
	LongtextType = "LONGTEXT"
	// LongblobType long blob
	LongblobType = "LONGBLOB"
	// BigintType big int
	BigintType = "BIGINT"
	// MediumtextType medium text
	MediumtextType = "MEDIUMTEXT"
	// MediumblobType medium blob
	MediumblobType = "MEDIUMBLOB"
	// SmallintType small int
	SmallintType = "SMALLINT"
	// TinyintType tiny int
	TinyintType = "TINYINT"
	// VarcharType varchar
	VarcharType = "VARCHAR(255)"
)

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, _ bool) string

func (*Vendor) Update

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

Directories

Path Synopsis
gen

Jump to

Keyboard shortcuts

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