mysql

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 20 Imported by: 5

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{}

func (*MySQL) InspectSchema

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

type SQL

type SQL struct{}

func (*SQL) InspectSchema

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

InspectSchema implements driver.Driver.

type SQLTidb

type SQLTidb struct{}

func (*SQLTidb) InspectSchema

func (self *SQLTidb) InspectSchema(_ context.Context, arg *driver.InspectOption) (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