mysql

package
v0.0.0-...-f9a4794 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewColumnDef

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

func NewForeignKey

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

func NewIndexDef

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

func NewTableDef

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

Types

type ColumnDef

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

func (*ColumnDef) Column

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

func (*ColumnDef) Definition

func (d *ColumnDef) Definition() string

func (*ColumnDef) GormTag

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

type ForeignKeyDef

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

func (*ForeignKeyDef) Definition

func (d *ForeignKeyDef) Definition() string

func (*ForeignKeyDef) ForeignKey

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

type IndexDef

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

func (*IndexDef) Definition

func (d *IndexDef) Definition() string

func (*IndexDef) Index

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

type MySQL

type MySQL struct{}

func (*MySQL) InspectSchema

func (ms *MySQL) InspectSchema(ctx context.Context, arg *driver.InspectOption) (*carp.Schema, error)

type SQL

type SQL struct{}

func (*SQL) InspectSchema

func (sq *SQL) InspectSchema(ctx context.Context, arg *driver.InspectOption) (*carp.Schema, error)

InspectSchema implements driver.Driver.

type SQLTidb

type SQLTidb struct{}

func (*SQLTidb) InspectSchema

func (st *SQLTidb) InspectSchema(_ context.Context, arg *driver.InspectOption) (*carp.Schema, error)

InspectSchema implements driver.Driver.

type TableDef

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

func (*TableDef) Definition

func (d *TableDef) Definition() string

func (*TableDef) PrimaryKey

func (d *TableDef) PrimaryKey() carp.IndexDef

func (*TableDef) Table

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

Jump to

Keyboard shortcuts

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