Documentation ¶
Index ¶
- func NewForeignKey(table, baseColumn string) contract.ForeignKey
- func NewForeignKeyByKeyInfo(ki *info.KeyInfo) contract.ForeignKey
- func NewUniqueKey(table, field string) contract.UniqueKey
- type ForeignKey
- func (fk *ForeignKey) Drop() contract.ForeignKey
- func (fk *ForeignKey) ForDrop() bool
- func (fk *ForeignKey) GenerateKeyName() contract.ForeignKey
- func (fk *ForeignKey) GetName() string
- func (fk *ForeignKey) GetSQL() string
- func (fk *ForeignKey) On(field string) contract.ForeignKey
- func (fk *ForeignKey) OnDelete(action string) contract.ForeignKey
- func (fk *ForeignKey) OnUpdate(action string) contract.ForeignKey
- func (fk *ForeignKey) Reference(table string) contract.ForeignKey
- func (fk *ForeignKey) SetKeyName(name string) contract.ForeignKey
- type PrimaryKey
- type UniqueKey
- func (uk *UniqueKey) Drop() contract.UniqueKey
- func (uk *UniqueKey) Exec(con *sqlx.DB) error
- func (uk *UniqueKey) GenerateKeyName() contract.UniqueKey
- func (uk *UniqueKey) GetName() string
- func (uk *UniqueKey) GetSQL() string
- func (uk *UniqueKey) MustExec(con *sqlx.DB)
- func (uk *UniqueKey) SetKeyName(name string) contract.UniqueKey
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 ¶
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) 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) 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) GenerateKeyName ¶
Click to show internal directories.
Click to hide internal directories.