mysql

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Schema = newSchema()

Functions

func InitMigrator

func InitMigrator() interfaces.Migrator

func NewBlueprint

func NewBlueprint() interfaces.Blueprint

func NewDriver

func NewDriver() (*driver, error)

func NewSeeder added in v1.2.0

func NewSeeder(table string, err error) interfaces.Seeder

func NewTestSeeder added in v1.2.0

func NewTestSeeder(driver mysql_interfaces.Driver, table string, err error) interfaces.Seeder

Types

type Blueprint

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

func (*Blueprint) Boolean

func (bp *Blueprint) Boolean(name string) interfaces.Blueprint

func (*Blueprint) Date

func (bp *Blueprint) Date(name string) interfaces.Blueprint

func (*Blueprint) DateTime

func (bp *Blueprint) DateTime(name string) interfaces.Blueprint

func (*Blueprint) Decimal added in v1.3.0

func (bp *Blueprint) Decimal(name string, length int, precision int) interfaces.Blueprint

func (*Blueprint) Default

func (bp *Blueprint) Default(value interface{}) interfaces.Blueprint

func (*Blueprint) Double added in v1.3.0

func (bp *Blueprint) Double(name string, length int, precision int) interfaces.Blueprint

func (*Blueprint) DropColumn

func (bp *Blueprint) DropColumn(column string)

func (*Blueprint) DropForeign added in v1.1.0

func (bp *Blueprint) DropForeign(name string)

func (*Blueprint) DropIndex added in v1.1.0

func (bp *Blueprint) DropIndex(name string)

func (*Blueprint) DropPrimary added in v1.1.0

func (bp *Blueprint) DropPrimary()

func (*Blueprint) DropUnique added in v1.1.0

func (bp *Blueprint) DropUnique(name string)

func (*Blueprint) Float added in v1.3.0

func (bp *Blueprint) Float(name string, length int, precision int) interfaces.Blueprint

func (*Blueprint) Foreign added in v1.1.0

func (bp *Blueprint) Foreign(name string) interfaces.ForeignBlueprint

func (*Blueprint) GetSqls added in v1.0.3

func (bp *Blueprint) GetSqls(table string, operation operation) []string

func (*Blueprint) Id

func (bp *Blueprint) Id(name string, length int)

func (*Blueprint) Index added in v1.1.0

func (bp *Blueprint) Index(column ...string) interfaces.Blueprint

func (*Blueprint) Integer

func (bp *Blueprint) Integer(name string, length int) interfaces.Blueprint

func (*Blueprint) Nullable

func (bp *Blueprint) Nullable() interfaces.Blueprint

func (*Blueprint) Primary added in v1.1.0

func (bp *Blueprint) Primary(name ...string) interfaces.Blueprint

func (*Blueprint) String

func (bp *Blueprint) String(name string, length int) interfaces.Blueprint

func (*Blueprint) Text

func (bp *Blueprint) Text(name string) interfaces.Blueprint

func (*Blueprint) Timestamps

func (bp *Blueprint) Timestamps()

func (*Blueprint) Unique added in v1.1.0

func (bp *Blueprint) Unique(column ...string) interfaces.Blueprint

type MockDriver added in v1.0.3

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

func NewMockDriver added in v1.0.3

func NewMockDriver() (*MockDriver, error)

func (*MockDriver) Close added in v1.0.3

func (d *MockDriver) Close() error

func (*MockDriver) Debug added in v1.0.3

func (d *MockDriver) Debug() *sqlx.DB

func (*MockDriver) Execute added in v1.0.3

func (d *MockDriver) Execute(sql string) (sql.Result, error)

func (*MockDriver) GetSqls added in v1.0.3

func (d *MockDriver) GetSqls() []string

func (*MockDriver) IsClose added in v1.0.3

func (d *MockDriver) IsClose() bool

func (*MockDriver) Query added in v1.0.3

func (d *MockDriver) Query(sql string) (*sql.Rows, error)

func (*MockDriver) Select added in v1.0.3

func (d *MockDriver) Select(dest interface{}, sql string) error

type Schema_test added in v1.0.3

type Schema_test struct{}

func (*Schema_test) Create added in v1.0.3

func (s *Schema_test) Create(driver mysql_interfaces.Driver, table string, schemaFunc func(interfaces.Blueprint)) interfaces.Seeder

func (*Schema_test) DropIfExists added in v1.0.3

func (s *Schema_test) DropIfExists(driver mysql_interfaces.Driver, table string) error

func (*Schema_test) Table added in v1.0.3

func (s *Schema_test) Table(driver mysql_interfaces.Driver, table string, schemaFunc func(interfaces.Blueprint)) error

type Seeder_test added in v1.2.0

type Seeder_test struct {
	*model.Seeder
	// contains filtered or unexported fields
}

func (*Seeder_test) Seed added in v1.2.0

func (s *Seeder_test) Seed(data ...map[string]interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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