mysql

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 20 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntoMixinEntity added in v0.2.1

func IntoMixinEntity(tb *schema.Table) ens.MixinEntity

func NewColumnDef

func NewColumnDef(col *schema.Column) ens.ColumnDef

func NewForeignKey

func NewForeignKey(fk *schema.ForeignKey) ens.ForeignKeyDef

func NewIndexDef

func NewIndexDef(index *schema.Index) ens.IndexDef

func NewTableDef

func NewTableDef(tb *schema.Table) ens.TableDef

Types

type ColumnDef

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

func (*ColumnDef) Column

func (self *ColumnDef) Column() *schema.Column

func (*ColumnDef) Definition

func (self *ColumnDef) Definition() string

func (*ColumnDef) GormTag

func (self *ColumnDef) GormTag(tb *schema.Table) string

column, type, not null, authIncrement, default, [primaryKey|index], comment

type ForeignKeyDef

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

func (*ForeignKeyDef) Definition

func (self *ForeignKeyDef) Definition() string

func (*ForeignKeyDef) ForeignKey

func (self *ForeignKeyDef) ForeignKey() *schema.ForeignKey

type IndexDef

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

func (*IndexDef) Definition

func (self *IndexDef) Definition() string

func (*IndexDef) Index

func (self *IndexDef) Index() *schema.Index

type MySQL

type MySQL struct{}

func (*MySQL) InspectSchema

func (self *MySQL) InspectSchema(ctx context.Context, arg *driver.InspectOption) (*ens.MixinSchema, error)

type SQL

type SQL struct{}

func (*SQL) InspectSchema

func (self *SQL) InspectSchema(_ context.Context, arg *driver.InspectOption) (*ens.MixinSchema, error)

InspectSchema implements driver.Driver.

type SQLTidb

type SQLTidb struct{}

func (*SQLTidb) InspectSchema

func (self *SQLTidb) InspectSchema(_ context.Context, arg *driver.InspectOption) (*ens.MixinSchema, error)

InspectSchema implements driver.Driver.

type TableDef

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

func (*TableDef) Definition

func (self *TableDef) Definition() string

func (*TableDef) PrimaryKey

func (self *TableDef) PrimaryKey() ens.IndexDef

func (*TableDef) Table

func (self *TableDef) Table() *schema.Table

Jump to

Keyboard shortcuts

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