mysql

package
v0.0.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 15 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntoEntity

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

Types

type ColumnDef

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

func NewColumnDef

func NewColumnDef(col *schema.Column) *ColumnDef

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 NewForeignKey

func NewForeignKey(fk *schema.ForeignKey) *ForeignKeyDef

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 NewIndexDef

func NewIndexDef(index *schema.Index) *IndexDef

func (*IndexDef) Definition

func (self *IndexDef) Definition() string

func (*IndexDef) Index

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

type MySQL

type MySQL struct {
	// URL See: https://atlasgo.io/url
	URL string
}

func (*MySQL) InspectSchema

func (self *MySQL) InspectSchema(ctx context.Context, opts *schema.InspectOptions) (ens.Schemaer, error)

type SQL

type SQL struct {
	CreateTableSQL string
}

func (*SQL) InspectSchema

func (self *SQL) InspectSchema(context.Context, *schema.InspectOptions) (ens.Schemaer, error)

InspectSchema implements driver.Driver.

type TableDef

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

func NewTableDef

func NewTableDef(tb *schema.Table) *TableDef

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