key

package
v1.2.10 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewForeignKey

func NewForeignKey(table, baseColumn string) contract.ForeignKey

func NewForeignKeyByKeyInfo

func NewForeignKeyByKeyInfo(ki *info.KeyInfo) contract.ForeignKey

func NewUniqueKey

func NewUniqueKey(table, field string) contract.UniqueKey

Types

type ForeignKey

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

func (*ForeignKey) Drop

func (fk *ForeignKey) Drop() contract.ForeignKey

func (*ForeignKey) ForDrop

func (fk *ForeignKey) ForDrop() bool

func (*ForeignKey) GenerateKeyName

func (fk *ForeignKey) GenerateKeyName() contract.ForeignKey

func (*ForeignKey) GetName

func (fk *ForeignKey) GetName() string

Helpful functions

func (*ForeignKey) GetSQL

func (fk *ForeignKey) GetSQL() string

func (*ForeignKey) On

func (fk *ForeignKey) On(field string) contract.ForeignKey

func (*ForeignKey) OnDelete

func (fk *ForeignKey) OnDelete(action string) contract.ForeignKey

func (*ForeignKey) OnUpdate

func (fk *ForeignKey) OnUpdate(action string) contract.ForeignKey

func (*ForeignKey) Reference

func (fk *ForeignKey) Reference(table string) contract.ForeignKey

func (*ForeignKey) SetKeyName

func (fk *ForeignKey) SetKeyName(name string) contract.ForeignKey

type PrimaryKey

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

func NewPrimaryKey

func NewPrimaryKey(table, field string) *PrimaryKey

func (*PrimaryKey) Drop

func (pk *PrimaryKey) Drop() *PrimaryKey

func (*PrimaryKey) GenerateKeyName

func (pk *PrimaryKey) GenerateKeyName() *PrimaryKey

func (*PrimaryKey) GetName

func (pk *PrimaryKey) GetName() string

Helpful functions

func (*PrimaryKey) GetSQL

func (pk *PrimaryKey) GetSQL() string

func (*PrimaryKey) SetKeyName

func (pk *PrimaryKey) SetKeyName(name string) *PrimaryKey

type UniqueKey

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

func (*UniqueKey) Drop

func (uk *UniqueKey) Drop() contract.UniqueKey

func (*UniqueKey) Exec

func (uk *UniqueKey) Exec(con *sqlx.DB) error

func (*UniqueKey) GenerateKeyName

func (uk *UniqueKey) GenerateKeyName() contract.UniqueKey

func (*UniqueKey) GetName

func (uk *UniqueKey) GetName() string

Helpful functions

func (*UniqueKey) GetSQL

func (uk *UniqueKey) GetSQL() string

func (*UniqueKey) MustExec

func (uk *UniqueKey) MustExec(con *sqlx.DB)

func (*UniqueKey) SetKeyName

func (uk *UniqueKey) SetKeyName(name string) contract.UniqueKey

Jump to

Keyboard shortcuts

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